refractor usbd-dcd callback, add bus event isr
This commit is contained in:
@@ -50,6 +50,20 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// APPLICATION API
|
||||
//--------------------------------------------------------------------+
|
||||
/** \brief Check if the interface is configured and ready to use
|
||||
* \param[in] coreid USB Controller ID
|
||||
* \retval true if the interface is configured
|
||||
* \retval false if the interface is not configured (e.g device is not attached)
|
||||
* \note This function should be call frequently or before any xfer attempt to check if device is still attached
|
||||
*/
|
||||
bool tusbd_msc_is_configured(uint8_t coreid);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// APPLICATION CALLBACK API
|
||||
//--------------------------------------------------------------------+
|
||||
void tusbd_msc_mounted_cb(uint8_t coreid);
|
||||
void tusbd_msc_unmounted_cb(uint8_t coreid);
|
||||
|
||||
// p_length [in,out] allocated/maximum length, application update with actual length
|
||||
msc_csw_status_t tusbd_msc_scsi_received_isr (uint8_t coreid, uint8_t lun, uint8_t scsi_cmd[16], void ** pp_buffer, uint16_t* p_length);
|
||||
|
||||
@@ -62,10 +76,10 @@ tusb_error_t tusbh_msc_write10(uint8_t dev_addr, uint8_t lun, void const * p_buf
|
||||
#ifdef _TINY_USB_SOURCE_FILE_
|
||||
|
||||
void mscd_init(void);
|
||||
void mscd_bus_reset(uint8_t coreid);
|
||||
tusb_error_t mscd_open(uint8_t coreid, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length);
|
||||
tusb_error_t mscd_control_request(uint8_t coreid, tusb_control_request_t const * p_request);
|
||||
void mscd_isr(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
|
||||
void mscd_close(uint8_t coreid);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user