17 if (ctrlLineState != 3)
19 volatile int debug = 1;
49 len -= num_bytes_sent;
128 cb_ = rx_callback_ptr;
void vcp_ls_callback(void *context, uint16_t ctrlLineState)
USBD_Class_cb_TypeDef USBD_CDC_cb
uint32_t CDC_Send_FreeBytes(void)
volatile uint32_t millis(void)
std::function< void(uint8_t)> cb_
void set_mode(gpio_mode_t mode)
std::function< void(uint8_t)> receive_CB_
void USBD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID, USBD_DEVICE *pDevice, USBD_Class_cb_TypeDef *class_cb, USBD_Usr_cb_TypeDef *usr_cb)
USBD_Init Initializes the device stack and load the class driver.
USBD_Usr_cb_TypeDef USR_cb
void register_rx_callback(void(*rx_callback_ptr)(uint8_t data)) override
void init(GPIO_TypeDef *BasePort, uint16_t pin, gpio_mode_t mode)
void CDC_SetCtrlLineStateCb(void(*cb)(void *context, uint16_t ctrlLineState), void *context)
void perform_maintenance()
void put_byte(uint8_t ch) override
uint32_t tx_bytes_free() override
virtual void write(const uint8_t *ch, uint8_t len) override
uint32_t CDC_Receive_DATA(uint8_t *recvBuf, uint32_t len)
uint32_t CDC_Receive_BytesAvailable(void)
void write(gpio_write_t state)
void unregister_rx_callback() override
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength)
uint32_t rx_bytes_waiting() override
USB_OTG_CORE_HANDLE USB_OTG_dev
void send_disconnect_signal()
bool tx_buffer_empty() override
void vcp_rx_callback(uint8_t byte)
uint8_t read_byte() override