diff options
Diffstat (limited to 'stm/usb.c')
-rw-r--r-- | stm/usb.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -21,6 +21,7 @@ extern CDC_IF_Prop_TypeDef VCP_fops; USB_OTG_CORE_HANDLE USB_OTG_Core; static int dev_is_enabled = 0; +uint32_t APP_dev_is_connected = 0; /* used by usbd_cdc_vcp */ static char rx_buf[64]; static int rx_buf_in; static int rx_buf_out; @@ -48,6 +49,10 @@ bool usb_vcp_is_enabled(void) { return dev_is_enabled; } +bool usb_vcp_is_connected(void) { + return APP_dev_is_connected; +} + void usb_vcp_set_interrupt_char(int c) { if (dev_is_enabled) { interrupt_char = c; |