summaryrefslogtreecommitdiff
path: root/examples/host/cdc_msc_hid/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/host/cdc_msc_hid/src/main.c')
-rw-r--r--examples/host/cdc_msc_hid/src/main.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c
index 664cbf035..b34810252 100644
--- a/examples/host/cdc_msc_hid/src/main.c
+++ b/examples/host/cdc_msc_hid/src/main.c
@@ -35,7 +35,7 @@
//--------------------------------------------------------------------+
void led_blinking_task(void);
-extern void cdc_task(void);
+extern void cdc_app_task(void);
extern void hid_app_task(void);
/*------------- MAIN -------------*/
@@ -52,47 +52,16 @@ int main(void)
{
// tinyusb host task
tuh_task();
- led_blinking_task();
-
-#if CFG_TUH_CDC
- cdc_task();
-#endif
-#if CFG_TUH_HID
+ led_blinking_task();
+ cdc_app_task();
hid_app_task();
-#endif
}
return 0;
}
//--------------------------------------------------------------------+
-// USB CDC
-//--------------------------------------------------------------------+
-#if CFG_TUH_CDC
-CFG_TUSB_MEM_SECTION static char serial_in_buffer[64] = { 0 };
-
-// invoked ISR context
-void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
-{
- (void) event;
- (void) pipe_id;
- (void) xferred_bytes;
-
- printf(serial_in_buffer);
- tu_memclr(serial_in_buffer, sizeof(serial_in_buffer));
-
- tuh_cdc_receive(dev_addr, serial_in_buffer, sizeof(serial_in_buffer), true); // waiting for next data
-}
-
-void cdc_task(void)
-{
-
-}
-
-#endif
-
-//--------------------------------------------------------------------+
// TinyUSB Callbacks
//--------------------------------------------------------------------+