From 2882390c82fc08a669093419abc69f25bc11a34f Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Mar 2021 15:23:08 +0700 Subject: clean up some examples --- examples/device/cdc_msc/src/main.c | 28 +++++++++++++--------------- examples/device/cdc_msc/src/tusb_config.h | 3 +++ 2 files changed, 16 insertions(+), 15 deletions(-) (limited to 'examples/device/cdc_msc/src') diff --git a/examples/device/cdc_msc/src/main.c b/examples/device/cdc_msc/src/main.c index a20a80fcd..131ae6549 100644 --- a/examples/device/cdc_msc/src/main.c +++ b/examples/device/cdc_msc/src/main.c @@ -48,7 +48,6 @@ enum { static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED; void led_blinking_task(void); - void cdc_task(void); /*------------- MAIN -------------*/ @@ -112,18 +111,16 @@ void cdc_task(void) // connected and there are data available if ( tud_cdc_available() ) { - uint8_t buf[64]; - - // read and echo back + // read datas + char buf[64]; uint32_t count = tud_cdc_read(buf, sizeof(buf)); + (void) count; - for(uint32_t i=0; i