summaryrefslogtreecommitdiff
path: root/tinyusb/class
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/class')
-rw-r--r--tinyusb/class/cdc/cdc_device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tinyusb/class/cdc/cdc_device.c b/tinyusb/class/cdc/cdc_device.c
index dbcebe5ee..df19cdfcd 100644
--- a/tinyusb/class/cdc/cdc_device.c
+++ b/tinyusb/class/cdc/cdc_device.c
@@ -88,9 +88,8 @@ STATIC_VAR cdcd_data_t cdcd_data[CONTROLLER_DEVICE_NUMBER];
//--------------------------------------------------------------------+
bool tud_n_cdc_connected(uint8_t rhport)
{
- // Either RTS (bit 1) or DTR (bit 0) active considered as connected
- // May only check for DTR only
- return (cdcd_data[rhport].line_state != 0);
+ // DTR (bit 0) active isconsidered as connected
+ return BIT_TEST_(cdcd_data[rhport].line_state, 0);
}
uint8_t tud_n_cdc_get_line_state (uint8_t rhport)