diff options
| author | hathach <[email protected]> | 2013-09-24 15:05:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-24 15:21:16 +0700 |
| commit | 63b776f7cf3bb7fe64c2f3b3e383a90b2c50683f (patch) | |
| tree | 1df33c2d8b80310eb7da613e56830181b0cf2fca /tinyusb/class/msc_host.h | |
| parent | c4fef827b1f6cb33b9cc336687bd4ff791f8eec9 (diff) | |
add some tests support for msc host
refractor msch buffer for getting inital scsi like inquiry, read capacity
adding support for resovling stall on control pipe
Diffstat (limited to 'tinyusb/class/msc_host.h')
| -rw-r--r-- | tinyusb/class/msc_host.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tinyusb/class/msc_host.h b/tinyusb/class/msc_host.h index 324dad984..65265ddb9 100644 --- a/tinyusb/class/msc_host.h +++ b/tinyusb/class/msc_host.h @@ -76,6 +76,8 @@ tusb_error_t tusbh_msc_write10(uint8_t dev_addr, void const * p_data, uint32_t //------------- Application Callback -------------// void tusbh_msc_mounted_cb(uint8_t dev_addr); +void tusbh_msc_unmounted_isr(uint8_t dev_addr); +void tusbh_msc_isr(uint8_t dev_addr, tusb_event_t event); //--------------------------------------------------------------------+ @@ -83,6 +85,21 @@ void tusbh_msc_mounted_cb(uint8_t dev_addr); //--------------------------------------------------------------------+ #ifdef _TINY_USB_SOURCE_FILE_ +typedef struct { + pipe_handle_t bulk_in, bulk_out; + uint8_t interface_number; + + uint8_t max_lun; + uint16_t block_size; + uint32_t last_lba; // last logical block address + + uint8_t vendor_id[8]; + uint8_t product_id[16]; + + msc_cmd_block_wrapper_t cbw; + msc_cmd_status_wrapper_t csw; +}msch_interface_t; + void msch_init(void); tusb_error_t msch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT; void msch_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes); |
