clean up example

This commit is contained in:
hathach
2018-03-11 19:43:03 +07:00
parent 078f600055
commit f5260610d3
4 changed files with 7 additions and 7 deletions

View File

@@ -96,14 +96,14 @@ tusb_error_t cdc_serial_subtask(void)
{
OSAL_SUBTASK_BEGIN
if ( tud_mounted(0) && tud_cdc_available(0) )
if ( tud_mounted() && tud_cdc_available() )
{
uint8_t buf[64];
// read and echo back
uint32_t count = tud_cdc_read(0, buf, sizeof(buf));
uint32_t count = tud_cdc_read(buf, sizeof(buf));
tud_cdc_write(0, buf, count);
tud_cdc_write(buf, count);
}
OSAL_SUBTASK_END