summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-06-23 14:26:56 +0700
committerhathach <[email protected]>2013-06-23 14:26:56 +0700
commitc7f7bc9808715c2be40b2b54f27b4ddab71f0279 (patch)
tree2cbbad1a2c7ab12be9e8d86ba6802a2d28667b03
parenta531d27a49ac7b97e02dac28a288661122d96d0c (diff)
increase sequence each 64 byte packet
-rw-r--r--demos/host/host_bulk_xfer/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/demos/host/host_bulk_xfer/main.c b/demos/host/host_bulk_xfer/main.c
index 68127598a..754c65189 100644
--- a/demos/host/host_bulk_xfer/main.c
+++ b/demos/host/host_bulk_xfer/main.c
@@ -112,18 +112,22 @@ int main(void)
// BLINKING TASK
//--------------------------------------------------------------------+
uint8_t custom_read_buffer[4*1024] TUSB_CFG_ATTR_USBRAM;
-uint32_t custom_write_buffer[1024] TUSB_CFG_ATTR_USBRAM;
+uint32_t custom_write_buffer[64][64] TUSB_CFG_ATTR_USBRAM; // still 4k
void custom_class_loopback_task (void* p_task_para)
{
if( tusbh_custom_is_mounted(1, 0, 0) ) // hardcode addr = 1, ignore vendor/product ID
{
tusbh_custom_read(1, 0, 0, custom_read_buffer, sizeof(custom_read_buffer));
+
if (TUSB_ERROR_NONE == tusbh_custom_write(1, 0, 0, custom_write_buffer, sizeof(custom_write_buffer)))
{
static uint32_t magic_number = 1;
- custom_write_buffer[0] = magic_number;
- magic_number += 2;
+ for(uint32_t i = 0; i < 64; i++)
+ {
+ custom_write_buffer[i][0] = magic_number;
+ magic_number += 2;
+ }
}
}
}