clean up some examples
This commit is contained in:
@@ -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) )
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user