diff options
| author | hathach <[email protected]> | 2018-11-23 15:17:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-11-23 15:17:43 +0700 |
| commit | a619ff88a36e4b841cb5901135b1811b06c3c843 (patch) | |
| tree | 9212c44046d8d37a86d000d9f1f5c8bc3f54d3f6 /examples | |
| parent | cb8782e5f28b4897e73520c91296d1ac7d71da81 (diff) | |
rename xfer complete enum
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/obsolete/device/src/keyboard_device_app.c | 6 | ||||
| -rw-r--r-- | examples/obsolete/device/src/mouse_device_app.c | 6 | ||||
| -rw-r--r-- | examples/obsolete/host/src/cdc_serial_host_app.c | 6 | ||||
| -rw-r--r-- | examples/obsolete/host/src/keyboard_host_app.c | 4 | ||||
| -rw-r--r-- | examples/obsolete/host/src/mouse_host_app.c | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/examples/obsolete/device/src/keyboard_device_app.c b/examples/obsolete/device/src/keyboard_device_app.c index 6c413464e..5e14c56c9 100644 --- a/examples/obsolete/device/src/keyboard_device_app.c +++ b/examples/obsolete/device/src/keyboard_device_app.c @@ -70,9 +70,9 @@ void tud_hid_keyboard_cb(uint8_t rhport, xfer_result_t event, uint32_t xferred_b { switch(event) { - case TUSB_EVENT_XFER_COMPLETE: - case TUSB_EVENT_XFER_ERROR: - case TUSB_EVENT_XFER_STALLED: + case XFER_RESULT_SUCCESS: + case XFER_RESULT_FAILED: + case XFER_RESULT_STALLED: default: break; } } diff --git a/examples/obsolete/device/src/mouse_device_app.c b/examples/obsolete/device/src/mouse_device_app.c index 4c4d322d7..6869f1a05 100644 --- a/examples/obsolete/device/src/mouse_device_app.c +++ b/examples/obsolete/device/src/mouse_device_app.c @@ -70,9 +70,9 @@ void tud_hid_mouse_cb(uint8_t rhport, xfer_result_t event, uint32_t xferred_byte { switch(event) { - case TUSB_EVENT_XFER_COMPLETE: - case TUSB_EVENT_XFER_ERROR: - case TUSB_EVENT_XFER_STALLED: + case XFER_RESULT_SUCCESS: + case XFER_RESULT_FAILED: + case XFER_RESULT_STALLED: default: break; } } diff --git a/examples/obsolete/host/src/cdc_serial_host_app.c b/examples/obsolete/host/src/cdc_serial_host_app.c index afb2b8937..85604dcdf 100644 --- a/examples/obsolete/host/src/cdc_serial_host_app.c +++ b/examples/obsolete/host/src/cdc_serial_host_app.c @@ -84,17 +84,17 @@ void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_i case CDC_PIPE_DATA_IN: switch(event) { - case TUSB_EVENT_XFER_COMPLETE: + case XFER_RESULT_SUCCESS: received_bytes = xferred_bytes; osal_semaphore_post(sem_hdl); // notify main task break; - case TUSB_EVENT_XFER_ERROR: + case XFER_RESULT_FAILED: received_bytes = 0; // ignore tuh_cdc_receive(dev_addr, serial_in_buffer, SERIAL_BUFFER_SIZE, true); // waiting for next data break; - case TUSB_EVENT_XFER_STALLED: + case XFER_RESULT_STALLED: default : break; } diff --git a/examples/obsolete/host/src/keyboard_host_app.c b/examples/obsolete/host/src/keyboard_host_app.c index 27d10b9e7..fd51548c3 100644 --- a/examples/obsolete/host/src/keyboard_host_app.c +++ b/examples/obsolete/host/src/keyboard_host_app.c @@ -81,12 +81,12 @@ void tuh_hid_keyboard_isr(uint8_t dev_addr, xfer_result_t event) { switch(event) { - case TUSB_EVENT_XFER_COMPLETE: + case XFER_RESULT_SUCCESS: osal_queue_send(queue_kbd_hdl, &usb_keyboard_report); tuh_hid_keyboard_get_report(dev_addr, (uint8_t*) &usb_keyboard_report); break; - case TUSB_EVENT_XFER_ERROR: + case XFER_RESULT_FAILED: tuh_hid_keyboard_get_report(dev_addr, (uint8_t*) &usb_keyboard_report); // ignore & continue break; diff --git a/examples/obsolete/host/src/mouse_host_app.c b/examples/obsolete/host/src/mouse_host_app.c index 05135693b..819c2b290 100644 --- a/examples/obsolete/host/src/mouse_host_app.c +++ b/examples/obsolete/host/src/mouse_host_app.c @@ -80,12 +80,12 @@ void tuh_hid_mouse_isr(uint8_t dev_addr, xfer_result_t event) { switch(event) { - case TUSB_EVENT_XFER_COMPLETE: + case XFER_RESULT_SUCCESS: osal_queue_send(queue_mouse_hdl, &usb_mouse_report); (void) tuh_hid_mouse_get_report(dev_addr, (uint8_t*) &usb_mouse_report); break; - case TUSB_EVENT_XFER_ERROR: + case XFER_RESULT_FAILED: (void) tuh_hid_mouse_get_report(dev_addr, (uint8_t*) &usb_mouse_report); // ignore & continue break; |
