summaryrefslogtreecommitdiff
path: root/examples/device/cdc_msc/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-11-24 00:06:59 +0700
committerhathach <[email protected]>2020-11-24 00:06:59 +0700
commit7860469661711bc9f73b2ae84529511693245d7b (patch)
tree45118dffea3b62b1a5a3ebc6588306450560f967 /examples/device/cdc_msc/src
parent4b4f88078503648b38444feee1fda322b65baa43 (diff)
comment out and add note for tud_cdc_connected() in cdc_msc examples
Diffstat (limited to 'examples/device/cdc_msc/src')
-rw-r--r--examples/device/cdc_msc/src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/device/cdc_msc/src/main.c b/examples/device/cdc_msc/src/main.c
index cf2bfd7c9..6b13ba5a4 100644
--- a/examples/device/cdc_msc/src/main.c
+++ b/examples/device/cdc_msc/src/main.c
@@ -105,7 +105,9 @@ void tud_resume_cb(void)
//--------------------------------------------------------------------+
void cdc_task(void)
{
- if ( tud_cdc_connected() )
+ // connected() check for DTR bit
+ // Most but not all terminal client set this when making connection
+ // if ( tud_cdc_connected() )
{
// connected and there are data available
if ( tud_cdc_available() )
@@ -133,7 +135,7 @@ void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
(void) itf;
// connected
- if ( dtr && rts )
+ if ( dtr )
{
// print initial message when connected
tud_cdc_write_str("\r\nTinyUSB CDC MSC device example\r\n");