add tud_speed_get()
- define both fs and hs configuration descriptor - rename CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE with default size of 64 for FS, and 512 for HS
This commit is contained in:
@@ -294,6 +294,11 @@ void usbd_driver_print_control_complete_name(bool (*control_complete) (uint8_t,
|
||||
//--------------------------------------------------------------------+
|
||||
// Application API
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_speed_t tud_speed_get(void)
|
||||
{
|
||||
return (tusb_speed_t) _usbd_dev.speed;
|
||||
}
|
||||
|
||||
bool tud_mounted(void)
|
||||
{
|
||||
return _usbd_dev.configured;
|
||||
|
||||
@@ -53,6 +53,9 @@ bool tud_task_event_ready(void);
|
||||
// Interrupt handler, name alias to DCD
|
||||
#define tud_int_handler dcd_int_handler
|
||||
|
||||
// Get current bus speed
|
||||
tusb_speed_t tud_speed_get(void);
|
||||
|
||||
// Check if device is connected and configured
|
||||
bool tud_mounted(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user