Skip to content

Commit 5e0da73

Browse files
committedFeb 27, 2019
Check the DTR value when deciding to drop data
1 parent 60e4d4a commit 5e0da73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎cores/arduino/stm32/usb/cdc/usbd_cdc_if.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ void CDC_deInit(void)
245245
}
246246
}
247247

248-
uint8_t CDC_connected()
248+
bool CDC_connected()
249249
{
250-
return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED;
250+
return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED && lineState;
251251
}
252252

253253
void CDC_continue_transmit(void)

‎cores/arduino/stm32/usb/cdc/usbd_cdc_if.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void CDC_continue_transmit(void);
5050
void CDC_resume_receive(void);
5151
void CDC_init(void);
5252
void CDC_deInit(void);
53-
uint8_t CDC_connected();
53+
bool CDC_connected();
5454

5555
#ifdef __cplusplus
5656
}

0 commit comments

Comments
 (0)
Please sign in to comment.