diff options
| author | hathach <[email protected]> | 2013-06-23 01:10:59 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-23 01:10:59 +0700 |
| commit | 2cc5df9b009a0e515be28a01ec50085eda0fcab4 (patch) | |
| tree | 29fe6820a8ea0450069084d2900834786bfc651e /demos | |
| parent | fe53297b17f59307d11ebfd303b8d09c7070ff4d (diff) | |
add custom bulk out test
Diffstat (limited to 'demos')
| -rw-r--r-- | demos/host/host_bulk_xfer/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/demos/host/host_bulk_xfer/main.c b/demos/host/host_bulk_xfer/main.c index 7c20c4f30..8ce7ef6b4 100644 --- a/demos/host/host_bulk_xfer/main.c +++ b/demos/host/host_bulk_xfer/main.c @@ -112,12 +112,18 @@ int main(void) // BLINKING TASK //--------------------------------------------------------------------+ uint8_t custom_read_buffer[4*1024] TUSB_CFG_ATTR_USBRAM; -uint8_t custom_write_buffer[4*1024] TUSB_CFG_ATTR_USBRAM; +uint32_t custom_write_buffer[1024] TUSB_CFG_ATTR_USBRAM; 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)); + + static uint32_t magic_number = 1; + custom_write_buffer[0] = magic_number; + tusbh_custom_write(1, 0, 0, custom_write_buffer, sizeof(custom_write_buffer)); + + magic_number += 2; } } |
