diff options
| author | hathach <[email protected]> | 2013-03-26 12:14:04 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-26 12:14:04 +0700 |
| commit | 03d045ecde8961ec7ca1579b9d207a0a83d442e3 (patch) | |
| tree | 58cac547725fdf8937c06a8781dfec3cb9143371 /tinyusb/host | |
| parent | 54acee1fc80ce6f3ba86c91db4409e1ebfbda638 (diff) | |
- put ATTR_UNUSED to hardfault handler variables to discard compiler warning
- change host_class_driver_t: open_subtask signature to accept tusb_descriptor_interface_t const * instead of uint8_t*
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/usbh.c | 5 | ||||
| -rw-r--r-- | tinyusb/host/usbh.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index 208139276..6717b2c70 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -386,7 +386,7 @@ OSAL_TASK_DECLARE(usbh_enumeration_task) // parse each interfaces while( p_desc < enum_data_buffer + ((tusb_descriptor_configuration_t*)enum_data_buffer)->wTotalLength ) { - TASK_ASSERT( TUSB_DESC_INTERFACE == ((tusb_descriptor_interface_t*) p_desc)->bDescriptorType ); // TODO should we skip this descriptor and advance + TASK_ASSERT( TUSB_DESC_INTERFACE == p_desc[DESCRIPTOR_OFFSET_TYPE] ); // TODO should we skip this descriptor and advance uint8_t class_code = ((tusb_descriptor_interface_t*) p_desc)->bInterfaceClass; if (class_code == 0) @@ -398,7 +398,8 @@ OSAL_TASK_DECLARE(usbh_enumeration_task) { uint16_t length=0; OSAL_SUBTASK_INVOKED_AND_WAIT ( // parameters in task/sub_task must be static storage (static or global) - usbh_class_drivers[ ((tusb_descriptor_interface_t*) p_desc)->bInterfaceClass ].open_subtask(new_addr, p_desc, &length) ); + usbh_class_drivers[ ((tusb_descriptor_interface_t*) p_desc)->bInterfaceClass ].open_subtask( + new_addr, (tusb_descriptor_interface_t*) p_desc, &length) ); // TODO check class_open_subtask status usbh_devices[new_addr].flag_supported_class |= BIT_(((tusb_descriptor_interface_t*) p_desc)->bInterfaceClass); diff --git a/tinyusb/host/usbh.h b/tinyusb/host/usbh.h index 00edf712a..1e1653e8c 100644 --- a/tinyusb/host/usbh.h +++ b/tinyusb/host/usbh.h @@ -72,7 +72,7 @@ typedef enum pipe_status_{ typedef struct { void (* const init) (void); - tusb_error_t (* const open_subtask)(uint8_t, uint8_t const *, uint16_t*); + tusb_error_t (* const open_subtask)(uint8_t, tusb_descriptor_interface_t const *, uint16_t*); void (* const isr) (pipe_handle_t, tusb_bus_event_t); void (* const close) (uint8_t); } host_class_driver_t; |
