diff options
| author | hathach <[email protected]> | 2013-11-21 12:47:55 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-11-21 12:47:55 +0700 |
| commit | 6887e5e642c71666d622d28b52e1d32fea67982c (patch) | |
| tree | 8bbb974398b88df45a16e1076c9d06ddb2814c3c /tinyusb/class/msc_device.h | |
| parent | d94efa60d62a6b6b1beecaf823ab67648563ea52 (diff) | |
refractor usbd-dcd callback, add bus event isr
Diffstat (limited to 'tinyusb/class/msc_device.h')
| -rw-r--r-- | tinyusb/class/msc_device.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tinyusb/class/msc_device.h b/tinyusb/class/msc_device.h index 3e6d9737f..5311a14f0 100644 --- a/tinyusb/class/msc_device.h +++ b/tinyusb/class/msc_device.h @@ -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
|
