diff options
| author | hathach <[email protected]> | 2019-03-21 19:01:04 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-21 19:01:04 +0700 |
| commit | f8faf05e9eaf2e3e4ca05006f382b422b9680f5c (patch) | |
| tree | 409d0b47887be7e879f215a59e592eeff9d03dd8 /examples/device | |
| parent | 3574688d264b92ae7082725076f0f0bc7c3534c2 (diff) | |
minor clean up
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/cdc_msc_hid/src/main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c index 5959f2960..b2a902835 100644 --- a/examples/device/cdc_msc_hid/src/main.c +++ b/examples/device/cdc_msc_hid/src/main.c @@ -93,6 +93,7 @@ void virtual_com_task(void) } } +// Invoked when cdc when line state changed e.g connected/disconnected void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) { (void) itf; @@ -104,6 +105,13 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) tud_cdc_write_str("\r\nTinyUSB CDC MSC HID device example\r\n"); } } + +// Invoked when CDC interface received data from host +void tud_cdc_rx_cb(uint8_t itf) +{ + (void) itf; +} + #endif //--------------------------------------------------------------------+ @@ -168,20 +176,18 @@ void tud_hid_generic_set_report_cb(uint8_t report_id, hid_report_type_t report_t //--------------------------------------------------------------------+ // tinyusb callbacks //--------------------------------------------------------------------+ + +// Invoked when device is mounted void tud_mount_cb(void) { } +// Invoked when device is unmounted void tud_umount_cb(void) { } -void tud_cdc_rx_cb(uint8_t itf) -{ - (void) itf; -} - //--------------------------------------------------------------------+ // BLINKING TASK //--------------------------------------------------------------------+ |
