diff options
| author | hathach <[email protected]> | 2013-06-23 14:21:44 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-23 14:21:44 +0700 |
| commit | a531d27a49ac7b97e02dac28a288661122d96d0c (patch) | |
| tree | 2e1bddcf82696c86e973e1185d068c73c8315ba6 | |
| parent | 2cc5df9b009a0e515be28a01ec50085eda0fcab4 (diff) | |
should fix problem with demo bulk out
| -rw-r--r-- | demos/host/host_bulk_xfer/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/demos/host/host_bulk_xfer/main.c b/demos/host/host_bulk_xfer/main.c index 8ce7ef6b4..68127598a 100644 --- a/demos/host/host_bulk_xfer/main.c +++ b/demos/host/host_bulk_xfer/main.c @@ -119,11 +119,12 @@ void custom_class_loopback_task (void* p_task_para) { 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; + 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; + } } } |
