We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85bc9b0 commit 08f932aCopy full SHA for 08f932a
cores/arduino/stm32/usb/cdc/usbd_cdc_if.c
@@ -245,9 +245,9 @@ void CDC_deInit(void)
245
}
246
247
248
-uint8_t CDC_connected()
+bool CDC_connected()
249
{
250
- return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED;
+ return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED && lineState;
251
252
253
void CDC_continue_transmit(void)
cores/arduino/stm32/usb/cdc/usbd_cdc_if.h
@@ -50,7 +50,7 @@ void CDC_continue_transmit(void);
50
void CDC_resume_receive(void);
51
void CDC_init(void);
52
void CDC_deInit(void);
53
-uint8_t CDC_connected();
+bool CDC_connected();
54
55
#ifdef __cplusplus
56
0 commit comments