summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_device.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-04-01 21:11:06 -0700
committerGitHub <[email protected]>2019-04-01 21:11:06 -0700
commit0848c462b3e431a9da42e96537d2b597a4579636 (patch)
tree746d6642e22e3ecf30d4f4c5f830c2a155bb28d7 /src/class/cdc/cdc_device.c
parent86c24b310509a368cc6a9dfbec43ce531e71d598 (diff)
parent2c1072c0aba48a2e6cbe93118c286b7999b0db43 (diff)
Merge pull request #51 from hathach/develop
Add suspend, resume and remote wakeup support
Diffstat (limited to 'src/class/cdc/cdc_device.c')
-rw-r--r--src/class/cdc/cdc_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index 2ac8d471c..c194aacd8 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -99,7 +99,7 @@ static void _prep_out_transaction (uint8_t itf)
bool tud_cdc_n_connected(uint8_t itf)
{
// DTR (bit 0) active is considered as connected
- return TU_BIT_TEST(_cdcd_itf[itf].line_state, 0);
+ return tud_ready() && TU_BIT_TEST(_cdcd_itf[itf].line_state, 0);
}
uint8_t tud_cdc_n_get_line_state (uint8_t itf)