mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
usbh name change
This commit is contained in:
parent
9c3c782b64
commit
212deaf2f8
@ -106,24 +106,24 @@ bool tuh_cdc_serial_is_mounted(uint8_t dev_addr)
|
|||||||
(cdch_data[dev_addr-1].itf_protocol <= CDC_COMM_PROTOCOL_ATCOMMAND_CDMA);
|
(cdch_data[dev_addr-1].itf_protocol <= CDC_COMM_PROTOCOL_ATCOMMAND_CDMA);
|
||||||
}
|
}
|
||||||
|
|
||||||
tusb_error_t tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify)
|
bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify)
|
||||||
{
|
{
|
||||||
TU_ASSERT( tuh_cdc_mounted(dev_addr), TUSB_ERROR_CDCH_DEVICE_NOT_MOUNTED);
|
TU_VERIFY( tuh_cdc_mounted(dev_addr) );
|
||||||
TU_ASSERT( p_data != NULL && length, TUSB_ERROR_INVALID_PARA);
|
TU_VERIFY( p_data != NULL && length, TUSB_ERROR_INVALID_PARA);
|
||||||
|
|
||||||
pipe_handle_t pipe_out = cdch_data[dev_addr-1].pipe_out;
|
pipe_handle_t pipe_out = cdch_data[dev_addr-1].pipe_out;
|
||||||
if ( hcd_pipe_is_busy(dev_addr, pipe_out) ) return TUSB_ERROR_INTERFACE_IS_BUSY;
|
if ( hcd_pipe_is_busy(dev_addr, pipe_out) ) return false;
|
||||||
|
|
||||||
return hcd_pipe_xfer(dev_addr, pipe_out, (void *) p_data, length, is_notify);
|
return hcd_pipe_xfer(dev_addr, pipe_out, (void *) p_data, length, is_notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
tusb_error_t tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify)
|
bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify)
|
||||||
{
|
{
|
||||||
TU_ASSERT( tuh_cdc_mounted(dev_addr), TUSB_ERROR_CDCH_DEVICE_NOT_MOUNTED);
|
TU_VERIFY( tuh_cdc_mounted(dev_addr) );
|
||||||
TU_ASSERT( p_buffer != NULL && length, TUSB_ERROR_INVALID_PARA);
|
TU_VERIFY( p_buffer != NULL && length, TUSB_ERROR_INVALID_PARA);
|
||||||
|
|
||||||
pipe_handle_t pipe_in = cdch_data[dev_addr-1].pipe_in;
|
pipe_handle_t pipe_in = cdch_data[dev_addr-1].pipe_in;
|
||||||
if ( hcd_pipe_is_busy(dev_addr, pipe_in) ) return TUSB_ERROR_INTERFACE_IS_BUSY;
|
if ( hcd_pipe_is_busy(dev_addr, pipe_in) ) return false;
|
||||||
|
|
||||||
return hcd_pipe_xfer(dev_addr, pipe_in, p_buffer, length, is_notify);
|
return hcd_pipe_xfer(dev_addr, pipe_in, p_buffer, length, is_notify);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ bool tuh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid);
|
|||||||
* \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
|
* \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
|
||||||
* interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION.
|
* interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION.
|
||||||
*/
|
*/
|
||||||
tusb_error_t tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify);
|
bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify);
|
||||||
|
|
||||||
/** \brief Perform USB IN transfer to get data from device
|
/** \brief Perform USB IN transfer to get data from device
|
||||||
* \param[in] dev_addr device address
|
* \param[in] dev_addr device address
|
||||||
@ -99,7 +99,7 @@ tusb_error_t tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length
|
|||||||
* \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
|
* \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the
|
||||||
* interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION.
|
* interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION.
|
||||||
*/
|
*/
|
||||||
tusb_error_t tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify);
|
bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify);
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// CDC APPLICATION CALLBACKS
|
// CDC APPLICATION CALLBACKS
|
||||||
|
@ -116,16 +116,16 @@ static tusb_error_t msch_command_xfer(uint8_t dev_addr, msch_interface_t * p_msc
|
|||||||
{ // there is data phase
|
{ // there is data phase
|
||||||
if (p_msch->cbw.dir & TUSB_DIR_IN_MASK)
|
if (p_msch->cbw.dir & TUSB_DIR_IN_MASK)
|
||||||
{
|
{
|
||||||
TU_ASSERT_ERR( hcd_pipe_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false), TUSB_ERROR_FAILED );
|
||||||
TU_ASSERT_ERR( hcd_pipe_queue_xfer(dev_addr, p_msch->bulk_in , p_buffer, p_msch->cbw.total_bytes) );
|
TU_ASSERT( hcd_pipe_queue_xfer(dev_addr, p_msch->bulk_in , p_buffer, p_msch->cbw.total_bytes), TUSB_ERROR_FAILED );
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
TU_ASSERT_ERR( hcd_pipe_queue_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t)) );
|
TU_ASSERT( hcd_pipe_queue_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t)), TUSB_ERROR_FAILED );
|
||||||
TU_ASSERT_ERR( hcd_pipe_xfer(dev_addr, p_msch->bulk_out , p_buffer, p_msch->cbw.total_bytes, false) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, p_msch->bulk_out , p_buffer, p_msch->cbw.total_bytes, false), TUSB_ERROR_FAILED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TU_ASSERT_ERR( hcd_pipe_xfer(dev_addr, p_msch->bulk_in , (uint8_t*) &p_msch->csw, sizeof(msc_csw_t), true) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, p_msch->bulk_in , (uint8_t*) &p_msch->csw, sizeof(msc_csw_t), true), TUSB_ERROR_FAILED);
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
return TUSB_ERROR_NONE;
|
||||||
}
|
}
|
||||||
@ -225,8 +225,8 @@ tusb_error_t tuh_msc_test_unit_ready(uint8_t dev_addr, uint8_t lun, msc_csw_t *
|
|||||||
memcpy(p_msch->cbw.command, &cmd_test_unit_ready, p_msch->cbw.cmd_len);
|
memcpy(p_msch->cbw.command, &cmd_test_unit_ready, p_msch->cbw.cmd_len);
|
||||||
|
|
||||||
// TODO MSCH refractor test uinit ready
|
// TODO MSCH refractor test uinit ready
|
||||||
TU_ASSERT_ERR( hcd_pipe_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, p_msch->bulk_out, (uint8_t*) &p_msch->cbw, sizeof(msc_cbw_t), false), TUSB_ERROR_FAILED );
|
||||||
TU_ASSERT_ERR( hcd_pipe_xfer(dev_addr, p_msch->bulk_in , (uint8_t*) p_csw, sizeof(msc_csw_t), true) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, p_msch->bulk_in , (uint8_t*) p_csw, sizeof(msc_csw_t), true), TUSB_ERROR_FAILED );
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
return TUSB_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +443,7 @@ pipe_handle_t hcd_pipe_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint
|
|||||||
return (pipe_handle_t) { .index = qhd_get_index(p_qhd) };
|
return (pipe_handle_t) { .index = qhd_get_index(p_qhd) };
|
||||||
}
|
}
|
||||||
|
|
||||||
tusb_error_t hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes)
|
bool hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes)
|
||||||
{
|
{
|
||||||
//------------- TODO pipe handle validate -------------//
|
//------------- TODO pipe handle validate -------------//
|
||||||
|
|
||||||
@ -451,7 +451,7 @@ tusb_error_t hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint
|
|||||||
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(dev_addr, pipe_hdl);
|
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(dev_addr, pipe_hdl);
|
||||||
ehci_qtd_t *p_qtd = qtd_find_free(dev_addr);
|
ehci_qtd_t *p_qtd = qtd_find_free(dev_addr);
|
||||||
|
|
||||||
TU_ASSERT(p_qtd, TUSB_ERROR_EHCI_NOT_ENOUGH_QTD);
|
TU_ASSERT(p_qtd);
|
||||||
|
|
||||||
qtd_init(p_qtd, (uint32_t) buffer, total_bytes);
|
qtd_init(p_qtd, (uint32_t) buffer, total_bytes);
|
||||||
p_qtd->pid = p_qhd->pid_non_control;
|
p_qtd->pid = p_qhd->pid_non_control;
|
||||||
@ -459,12 +459,12 @@ tusb_error_t hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint
|
|||||||
//------------- insert TD to TD list -------------//
|
//------------- insert TD to TD list -------------//
|
||||||
qtd_insert_to_qhd(p_qhd, p_qtd);
|
qtd_insert_to_qhd(p_qhd, p_qtd);
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
tusb_error_t hcd_pipe_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete)
|
bool hcd_pipe_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete)
|
||||||
{
|
{
|
||||||
TU_ASSERT_ERR ( hcd_pipe_queue_xfer(dev_addr, pipe_hdl, buffer, total_bytes) );
|
TU_ASSERT ( hcd_pipe_queue_xfer(dev_addr, pipe_hdl, buffer, total_bytes) );
|
||||||
|
|
||||||
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(dev_addr, pipe_hdl);
|
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(dev_addr, pipe_hdl);
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ tusb_error_t hcd_pipe_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t bu
|
|||||||
}
|
}
|
||||||
p_qhd->qtd_overlay.next.address = (uint32_t) p_qhd->p_qtd_list_head; // attach head QTD to QHD start transferring
|
p_qhd->qtd_overlay.next.address = (uint32_t) p_qhd->p_qtd_list_head; // attach head QTD to QHD start transferring
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// pipe_close should only be called as a part of unmount/safe-remove process
|
/// pipe_close should only be called as a part of unmount/safe-remove process
|
||||||
|
@ -145,8 +145,8 @@ bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t *
|
|||||||
// TODO control xfer should be used via usbh layer
|
// TODO control xfer should be used via usbh layer
|
||||||
|
|
||||||
pipe_handle_t hcd_pipe_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc);
|
pipe_handle_t hcd_pipe_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc);
|
||||||
tusb_error_t hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes) ATTR_WARN_UNUSED_RESULT; // only queue, not transferring yet
|
bool hcd_pipe_queue_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes) ATTR_WARN_UNUSED_RESULT; // only queue, not transferring yet
|
||||||
tusb_error_t hcd_pipe_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete) ATTR_WARN_UNUSED_RESULT;
|
bool hcd_pipe_xfer(uint8_t dev_addr, pipe_handle_t pipe_hdl, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete) ATTR_WARN_UNUSED_RESULT;
|
||||||
bool hcd_pipe_close(uint8_t rhport, uint8_t dev_addr, pipe_handle_t pipe_hdl);
|
bool hcd_pipe_close(uint8_t rhport, uint8_t dev_addr, pipe_handle_t pipe_hdl);
|
||||||
|
|
||||||
bool hcd_pipe_is_busy(uint8_t dev_addr, pipe_handle_t pipe_hdl);
|
bool hcd_pipe_is_busy(uint8_t dev_addr, pipe_handle_t pipe_hdl);
|
||||||
|
@ -155,7 +155,7 @@ void hub_init(void)
|
|||||||
// hub_enum_sem_hdl = osal_semaphore_create( OSAL_SEM_REF(hub_enum_semaphore) );
|
// hub_enum_sem_hdl = osal_semaphore_create( OSAL_SEM_REF(hub_enum_semaphore) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hub_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
|
bool hub_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length)
|
||||||
{
|
{
|
||||||
// not support multiple TT yet
|
// not support multiple TT yet
|
||||||
if ( p_interface_desc->bInterfaceProtocol > 1 ) return false;
|
if ( p_interface_desc->bInterfaceProtocol > 1 ) return false;
|
||||||
@ -204,7 +204,7 @@ bool hub_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t co
|
|||||||
}
|
}
|
||||||
|
|
||||||
//------------- Queue the initial Status endpoint transfer -------------//
|
//------------- Queue the initial Status endpoint transfer -------------//
|
||||||
TU_ASSERT( TUSB_ERROR_NONE == hcd_pipe_xfer(dev_addr, hub_data[dev_addr-1].pipe_status, &hub_data[dev_addr-1].status_change, 1, true) );
|
TU_ASSERT( hcd_pipe_xfer(dev_addr, hub_data[dev_addr-1].pipe_status, &hub_data[dev_addr-1].status_change, 1, true) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ void hub_close(uint8_t dev_addr)
|
|||||||
// osal_semaphore_reset(hub_enum_sem_hdl);
|
// osal_semaphore_reset(hub_enum_sem_hdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
tusb_error_t hub_status_pipe_queue(uint8_t dev_addr)
|
bool hub_status_pipe_queue(uint8_t dev_addr)
|
||||||
{
|
{
|
||||||
return hcd_pipe_xfer(dev_addr, hub_data[dev_addr-1].pipe_status, &hub_data[dev_addr-1].status_change, 1, true);
|
return hcd_pipe_xfer(dev_addr, hub_data[dev_addr-1].pipe_status, &hub_data[dev_addr-1].status_change, 1, true);
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ TU_VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct"
|
|||||||
bool hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port);
|
bool hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port);
|
||||||
bool hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port, uint8_t feature);
|
bool hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port, uint8_t feature);
|
||||||
tusb_speed_t hub_port_get_speed(void);
|
tusb_speed_t hub_port_get_speed(void);
|
||||||
tusb_error_t hub_status_pipe_queue(uint8_t dev_addr);
|
bool hub_status_pipe_queue(uint8_t dev_addr);
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// USBH-CLASS DRIVER API
|
// USBH-CLASS DRIVER API
|
||||||
@ -195,7 +195,7 @@ tusb_error_t hub_status_pipe_queue(uint8_t dev_addr);
|
|||||||
#ifdef _TINY_USB_SOURCE_FILE_
|
#ifdef _TINY_USB_SOURCE_FILE_
|
||||||
|
|
||||||
void hub_init(void);
|
void hub_init(void);
|
||||||
bool hub_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT;
|
bool hub_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *itf_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT;
|
||||||
void hub_isr(uint8_t dev_addr, xfer_result_t event, uint32_t xferred_bytes);
|
void hub_isr(uint8_t dev_addr, xfer_result_t event, uint32_t xferred_bytes);
|
||||||
void hub_close(uint8_t dev_addr);
|
void hub_close(uint8_t dev_addr);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ static host_class_driver_t const usbh_class_drivers[] =
|
|||||||
{
|
{
|
||||||
.class_code = TUSB_CLASS_CDC,
|
.class_code = TUSB_CLASS_CDC,
|
||||||
.init = cdch_init,
|
.init = cdch_init,
|
||||||
.open_subtask = cdch_open,
|
.open = cdch_open,
|
||||||
.isr = cdch_isr,
|
.isr = cdch_isr,
|
||||||
.close = cdch_close
|
.close = cdch_close
|
||||||
},
|
},
|
||||||
@ -81,7 +81,7 @@ static host_class_driver_t const usbh_class_drivers[] =
|
|||||||
{
|
{
|
||||||
.class_code = TUSB_CLASS_MSC,
|
.class_code = TUSB_CLASS_MSC,
|
||||||
.init = msch_init,
|
.init = msch_init,
|
||||||
.open_subtask = msch_open,
|
.open = msch_open,
|
||||||
.isr = msch_isr,
|
.isr = msch_isr,
|
||||||
.close = msch_close
|
.close = msch_close
|
||||||
},
|
},
|
||||||
@ -91,7 +91,7 @@ static host_class_driver_t const usbh_class_drivers[] =
|
|||||||
{
|
{
|
||||||
.class_code = TUSB_CLASS_HID,
|
.class_code = TUSB_CLASS_HID,
|
||||||
.init = hidh_init,
|
.init = hidh_init,
|
||||||
.open_subtask = hidh_open_subtask,
|
.open = hidh_open_subtask,
|
||||||
.isr = hidh_isr,
|
.isr = hidh_isr,
|
||||||
.close = hidh_close
|
.close = hidh_close
|
||||||
},
|
},
|
||||||
@ -101,7 +101,7 @@ static host_class_driver_t const usbh_class_drivers[] =
|
|||||||
{
|
{
|
||||||
.class_code = TUSB_CLASS_HUB,
|
.class_code = TUSB_CLASS_HUB,
|
||||||
.init = hub_init,
|
.init = hub_init,
|
||||||
.open_subtask = hub_open_subtask,
|
.open = hub_open,
|
||||||
.isr = hub_isr,
|
.isr = hub_isr,
|
||||||
.close = hub_close
|
.close = hub_close
|
||||||
},
|
},
|
||||||
@ -111,7 +111,7 @@ static host_class_driver_t const usbh_class_drivers[] =
|
|||||||
{
|
{
|
||||||
.class_code = TUSB_CLASS_VENDOR_SPECIFIC,
|
.class_code = TUSB_CLASS_VENDOR_SPECIFIC,
|
||||||
.init = cush_init,
|
.init = cush_init,
|
||||||
.open_subtask = cush_open_subtask,
|
.open = cush_open_subtask,
|
||||||
.isr = cush_isr,
|
.isr = cush_isr,
|
||||||
.close = cush_close
|
.close = cush_close
|
||||||
}
|
}
|
||||||
@ -611,7 +611,7 @@ bool enum_task(hcd_event_t* event)
|
|||||||
{
|
{
|
||||||
uint16_t itf_len = 0;
|
uint16_t itf_len = 0;
|
||||||
|
|
||||||
if ( usbh_class_drivers[drv_id].open_subtask(new_dev->rhport, new_addr, desc_itf, &itf_len) )
|
if ( usbh_class_drivers[drv_id].open(new_dev->rhport, new_addr, desc_itf, &itf_len) )
|
||||||
{
|
{
|
||||||
mark_interface_endpoint(new_dev->ep2drv, p_desc, itf_len, drv_id);
|
mark_interface_endpoint(new_dev->ep2drv, p_desc, itf_len, drv_id);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ typedef struct {
|
|||||||
uint8_t class_code;
|
uint8_t class_code;
|
||||||
|
|
||||||
void (* const init) (void);
|
void (* const init) (void);
|
||||||
bool (* const open_subtask)(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const * itf_desc, uint16_t* outlen);
|
bool (* const open)(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const * itf_desc, uint16_t* outlen);
|
||||||
void (* const isr) (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t len);
|
void (* const isr) (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t len);
|
||||||
void (* const close) (uint8_t);
|
void (* const close) (uint8_t);
|
||||||
} host_class_driver_t;
|
} host_class_driver_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user