diff options
| author | hathach <[email protected]> | 2018-04-17 17:06:40 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-04-17 17:06:40 +0700 |
| commit | 0e62cb1425f704ee3ac334f92992d5b0cfd2817d (patch) | |
| tree | 848776bc6d3c1579bf640244c1a28cf68df221a4 /tinyusb/class | |
| parent | 2def363e49627aca5f9d500fc480885f4fa911dd (diff) | |
correct cdc connected
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/cdc/cdc_device.c | 5 |
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)
|
