From e29409d4c833a5004d68f6e4721d2469968dd9a5 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 11 Mar 2018 19:45:13 +0700 Subject: [PATCH] clean up --- examples/device/nrf52840/src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/device/nrf52840/src/main.c b/examples/device/nrf52840/src/main.c index f48ade9df..65a21ff77 100644 --- a/examples/device/nrf52840/src/main.c +++ b/examples/device/nrf52840/src/main.c @@ -79,14 +79,14 @@ int main(void) void virtual_com_task(void) { // connected and there are data available - 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); } }