summaryrefslogtreecommitdiff
path: root/examples/device/cdc_dual_ports
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-03-18 15:23:08 +0700
committerhathach <[email protected]>2021-03-18 15:23:08 +0700
commit2882390c82fc08a669093419abc69f25bc11a34f (patch)
tree5a0a30e077e5847740e8a5543bf1c2267c6c9487 /examples/device/cdc_dual_ports
parentb221cedf80fadc4e810cca9408d91b12cf583e7e (diff)
clean up some examples
Diffstat (limited to 'examples/device/cdc_dual_ports')
-rw-r--r--examples/device/cdc_dual_ports/src/main.c6
-rw-r--r--examples/device/cdc_dual_ports/src/tusb_config.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/device/cdc_dual_ports/src/main.c b/examples/device/cdc_dual_ports/src/main.c
index 198c4252b..34cd29edd 100644
--- a/examples/device/cdc_dual_ports/src/main.c
+++ b/examples/device/cdc_dual_ports/src/main.c
@@ -63,13 +63,11 @@ static void echo_serial_port(uint8_t itf, uint8_t buf[], uint32_t count)
}
else
{
- // echo back additional ports as upper case
+ // echo back 2nd port as upper case
if (islower(buf[i])) buf[i] -= 'a' - 'A';
}
tud_cdc_n_write_char(itf, buf[i]);
-
- if ( buf[i] == '\r' ) tud_cdc_n_write_char(itf, '\n');
}
tud_cdc_n_write_flush(itf);
}
@@ -85,7 +83,7 @@ static void cdc_task(void)
{
// connected() check for DTR bit
// Most but not all terminal client set this when making connection
- if ( tud_cdc_n_connected(itf) )
+ // if ( tud_cdc_n_connected(itf) )
{
if ( tud_cdc_n_available(itf) )
{
diff --git a/examples/device/cdc_dual_ports/src/tusb_config.h b/examples/device/cdc_dual_ports/src/tusb_config.h
index 69001bdec..7db520dd1 100644
--- a/examples/device/cdc_dual_ports/src/tusb_config.h
+++ b/examples/device/cdc_dual_ports/src/tusb_config.h
@@ -104,6 +104,8 @@
#define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
+// CDC Endpoint transfer buffer size, more is faster
+#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#ifdef __cplusplus
}