27#ifndef _TUSB_MSC_DEVICE_H_
28#define _TUSB_MSC_DEVICE_H_
30#include "common/tusb_common.h"
41#if !defined(CFG_TUD_MSC_EP_BUFSIZE) & defined(CFG_TUD_MSC_BUFSIZE)
44 #define CFG_TUD_MSC_EP_BUFSIZE CFG_TUD_MSC_BUFSIZE
47#ifndef CFG_TUD_MSC_EP_BUFSIZE
48 #error CFG_TUD_MSC_EP_BUFSIZE must be defined, value of a block size should work well, the more the better
51TU_VERIFY_STATIC(CFG_TUD_MSC_EP_BUFSIZE < UINT16_MAX,
"Size is not correct");
58bool tud_msc_set_sense(uint8_t lun, uint8_t sense_key, uint8_t add_sense_code, uint8_t add_sense_qualifier);
76int32_t tud_msc_read10_cb (uint8_t lun, uint32_t lba, uint32_t offset,
void* buffer, uint32_t bufsize);
92int32_t tud_msc_write10_cb (uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize);
96void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4]);
100bool tud_msc_test_unit_ready_cb(uint8_t lun);
104void tud_msc_capacity_cb(uint8_t lun, uint32_t* block_count, uint16_t* block_size);
122int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t
const scsi_cmd[16],
void* buffer, uint16_t bufsize);
127TU_ATTR_WEAK uint8_t tud_msc_get_maxlun_cb(
void);
132TU_ATTR_WEAK
bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition,
bool start,
bool load_eject);
135TU_ATTR_WEAK int32_t tud_msc_request_sense_cb(uint8_t lun,
void* buffer, uint16_t bufsize);
138TU_ATTR_WEAK
void tud_msc_read10_complete_cb(uint8_t lun);
141TU_ATTR_WEAK
void tud_msc_write10_complete_cb(uint8_t lun);
144TU_ATTR_WEAK
void tud_msc_scsi_complete_cb(uint8_t lun, uint8_t
const scsi_cmd[16]);
147TU_ATTR_WEAK
bool tud_msc_is_writable_cb(uint8_t lun);
152void mscd_init (
void);
153void mscd_reset (uint8_t rhport);
156bool mscd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647