refractor hidh keyboard

changing class hidh behavior
This commit is contained in:
hathach
2013-03-24 21:40:49 +07:00
parent a1b17be681
commit c7c993d6cc
9 changed files with 85 additions and 98 deletions

View File

@@ -75,6 +75,7 @@ void hcd_isr(uint8_t hostid);
//--------------------------------------------------------------------+
// PIPE API
//--------------------------------------------------------------------+
// TODO control xfer should be used via usbh layer
tusb_error_t hcd_pipe_control_open(uint8_t dev_addr, uint8_t max_packet_size) ATTR_WARN_UNUSED_RESULT;
tusb_error_t hcd_pipe_control_xfer(uint8_t dev_addr, tusb_std_request_t const * p_request, uint8_t data[]) ATTR_WARN_UNUSED_RESULT;
tusb_error_t hcd_pipe_control_close(uint8_t dev_addr) ATTR_WARN_UNUSED_RESULT;

View File

@@ -100,7 +100,7 @@ static inline uint8_t get_configure_number_for_device(tusb_descriptor_device_t*
//--------------------------------------------------------------------+
tusb_device_state_t tusbh_device_get_state (uint8_t const dev_addr)
{
ASSERT(dev_addr <= TUSB_CFG_HOST_DEVICE_MAX, TUSB_DEVICE_STATE_INVALID_PARAMETER);
ASSERT_INT_WITHIN(1, TUSB_CFG_HOST_DEVICE_MAX, dev_addr, TUSB_DEVICE_STATE_INVALID_PARAMETER);
return usbh_devices[dev_addr].state;
}

View File

@@ -113,7 +113,6 @@ void tusbh_device_mount_failed_cb(tusb_error_t error, tusb_descriptor_de
#ifdef _TINY_USB_SOURCE_FILE_
tusb_error_t usbh_init(void);
pipe_status_t usbh_pipe_status_get(pipe_handle_t pipe_hdl) ATTR_WARN_UNUSED_RESULT;
#endif