Skip to content

Commit

Permalink
Check the DTR value when deciding to drop data
Browse files Browse the repository at this point in the history
  • Loading branch information
ghent360 committed Feb 27, 2019
1 parent 60e4d4a commit 5e0da73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cores/arduino/stm32/usb/cdc/usbd_cdc_if.c
Expand Up @@ -245,9 +245,9 @@ void CDC_deInit(void)
}
}

uint8_t CDC_connected()
bool CDC_connected()
{
return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED;
return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED && lineState;
}

void CDC_continue_transmit(void)
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/stm32/usb/cdc/usbd_cdc_if.h
Expand Up @@ -50,7 +50,7 @@ void CDC_continue_transmit(void);
void CDC_resume_receive(void);
void CDC_init(void);
void CDC_deInit(void);
uint8_t CDC_connected();
bool CDC_connected();

#ifdef __cplusplus
}
Expand Down

0 comments on commit 5e0da73

Please sign in to comment.