|
|
@@ -125,13 +125,34 @@ volatile bool ep_tx_busy_flag = false;
|
|
|
#define CDC_MAX_MPS 64
|
|
|
#endif
|
|
|
|
|
|
-void usbd_configure_done_callback(void)
|
|
|
+void usbd_event_handler(uint8_t event)
|
|
|
{
|
|
|
- /* setup first out ep read transfer */
|
|
|
- usbd_ep_start_read(CDC_OUT_EP, read_buffer, 2048);
|
|
|
- usbd_ep_start_read(CDC_OUT_EP2, read_buffer, 2048);
|
|
|
- usbd_ep_start_read(CDC_OUT_EP3, read_buffer, 2048);
|
|
|
- usbd_ep_start_read(CDC_OUT_EP4, read_buffer, 2048);
|
|
|
+ switch (event) {
|
|
|
+ case USBD_EVENT_RESET:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_CONNECTED:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_DISCONNECTED:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_RESUME:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_SUSPEND:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_CONFIGURED:
|
|
|
+ /* setup first out ep read transfer */
|
|
|
+ usbd_ep_start_read(CDC_OUT_EP, read_buffer, 2048);
|
|
|
+ usbd_ep_start_read(CDC_OUT_EP2, read_buffer, 2048);
|
|
|
+ usbd_ep_start_read(CDC_OUT_EP3, read_buffer, 2048);
|
|
|
+ usbd_ep_start_read(CDC_OUT_EP4, read_buffer, 2048);
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_SET_REMOTE_WAKEUP:
|
|
|
+ break;
|
|
|
+ case USBD_EVENT_CLR_REMOTE_WAKEUP:
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void usbd_cdc_acm_bulk_out(uint8_t ep, uint32_t nbytes)
|