Open
Description
Problem:
tud_cdc_connected is using DTR bit which is used in cdc_uart.c If DTR is not set by host (PC terminal or other device), we can't send anything to host.
same issue with #906, #921, #932
I don't think its necessary to check DTR as discussed in here -> hathach/tinyusb
Until user open the serial port, data buffer will be overridden.
static inline bool tud_cdc_connected (void)
{
return tud_cdc_n_connected(0);
}
bool tud_cdc_n_connected(uint8_t itf)
{
// DTR (bit 0) active is considered as connected
return tud_ready() && tu_bit_test(_cdcd_itf[itf].line_state, 0);
}
how to fix
change tud_cdc_connected()
with tud_ready()
Metadata
Metadata
Assignees
Labels
No labels