Open FFBoard
Open source force feedback firmware
msc_host.h File Reference

Go to the source code of this file.

Typedefs

typedef bool(* tuh_msc_complete_cb_t) (uint8_t dev_addr, tuh_msc_complete_data_t const *cb_data)
 

Functions

bool tuh_msc_mounted (uint8_t dev_addr)
 
bool tuh_msc_ready (uint8_t dev_addr)
 
uint8_t tuh_msc_get_maxlun (uint8_t dev_addr)
 
uint32_t tuh_msc_get_block_count (uint8_t dev_addr, uint8_t lun)
 
uint32_t tuh_msc_get_block_size (uint8_t dev_addr, uint8_t lun)
 
bool tuh_msc_scsi_command (uint8_t daddr, msc_cbw_t const *cbw, void *data, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_inquiry (uint8_t dev_addr, uint8_t lun, scsi_inquiry_resp_t *response, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_test_unit_ready (uint8_t dev_addr, uint8_t lun, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_request_sense (uint8_t dev_addr, uint8_t lun, void *response, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_read10 (uint8_t dev_addr, uint8_t lun, void *buffer, uint32_t lba, uint16_t block_count, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_write10 (uint8_t dev_addr, uint8_t lun, void const *buffer, uint32_t lba, uint16_t block_count, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
bool tuh_msc_read_capacity (uint8_t dev_addr, uint8_t lun, scsi_read_capacity10_resp_t *response, tuh_msc_complete_cb_t complete_cb, uintptr_t arg)
 
TU_ATTR_WEAK void tuh_msc_mount_cb (uint8_t dev_addr)
 
TU_ATTR_WEAK void tuh_msc_umount_cb (uint8_t dev_addr)
 
bool msch_init (void)
 
bool msch_deinit (void)
 
bool msch_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *desc_itf, uint16_t max_len)
 
bool msch_set_config (uint8_t dev_addr, uint8_t itf_num)
 
void msch_close (uint8_t dev_addr)
 
bool msch_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
 

Variables

 C
 

Typedef Documentation

◆ tuh_msc_complete_cb_t

typedef bool(* tuh_msc_complete_cb_t) (uint8_t dev_addr, tuh_msc_complete_data_t const *cb_data)

Definition at line 51 of file msc_host.h.

Function Documentation

◆ msch_close()

void msch_close ( uint8_t  dev_addr)

Definition at line 297 of file msc_host.c.

◆ msch_deinit()

bool msch_deinit ( void  )

Definition at line 293 of file msc_host.c.

◆ msch_init()

bool msch_init ( void  )

Definition at line 287 of file msc_host.c.

◆ msch_open()

bool msch_open ( uint8_t  rhport,
uint8_t  dev_addr,
tusb_desc_interface_t const *  desc_itf,
uint16_t  max_len 
)

Definition at line 371 of file msc_host.c.

◆ msch_set_config()

bool msch_set_config ( uint8_t  dev_addr,
uint8_t  itf_num 
)

Definition at line 402 of file msc_host.c.

◆ msch_xfer_cb()

bool msch_xfer_cb ( uint8_t  dev_addr,
uint8_t  ep_addr,
xfer_result_t  event,
uint32_t  xferred_bytes 
)

Definition at line 312 of file msc_host.c.

◆ tuh_msc_get_block_count()

uint32_t tuh_msc_get_block_count ( uint8_t  dev_addr,
uint8_t  lun 
)

Definition at line 99 of file msc_host.c.

◆ tuh_msc_get_block_size()

uint32_t tuh_msc_get_block_size ( uint8_t  dev_addr,
uint8_t  lun 
)

Definition at line 104 of file msc_host.c.

◆ tuh_msc_get_maxlun()

uint8_t tuh_msc_get_maxlun ( uint8_t  dev_addr)

Definition at line 94 of file msc_host.c.

◆ tuh_msc_inquiry()

bool tuh_msc_inquiry ( uint8_t  dev_addr,
uint8_t  lun,
scsi_inquiry_resp_t response,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 167 of file msc_host.c.

◆ tuh_msc_mount_cb()

TU_ATTR_WEAK void tuh_msc_mount_cb ( uint8_t  dev_addr)

◆ tuh_msc_mounted()

bool tuh_msc_mounted ( uint8_t  dev_addr)

Definition at line 109 of file msc_host.c.

◆ tuh_msc_read10()

bool tuh_msc_read10 ( uint8_t  dev_addr,
uint8_t  lun,
void *  buffer,
uint32_t  lba,
uint16_t  block_count,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 222 of file msc_host.c.

◆ tuh_msc_read_capacity()

bool tuh_msc_read_capacity ( uint8_t  dev_addr,
uint8_t  lun,
scsi_read_capacity10_resp_t response,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 151 of file msc_host.c.

◆ tuh_msc_ready()

bool tuh_msc_ready ( uint8_t  dev_addr)

Definition at line 114 of file msc_host.c.

◆ tuh_msc_request_sense()

bool tuh_msc_request_sense ( uint8_t  dev_addr,
uint8_t  lun,
void *  response,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 204 of file msc_host.c.

◆ tuh_msc_scsi_command()

bool tuh_msc_scsi_command ( uint8_t  daddr,
msc_cbw_t const *  cbw,
void *  data,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 129 of file msc_host.c.

◆ tuh_msc_test_unit_ready()

bool tuh_msc_test_unit_ready ( uint8_t  dev_addr,
uint8_t  lun,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 188 of file msc_host.c.

◆ tuh_msc_umount_cb()

TU_ATTR_WEAK void tuh_msc_umount_cb ( uint8_t  dev_addr)

◆ tuh_msc_write10()

bool tuh_msc_write10 ( uint8_t  dev_addr,
uint8_t  lun,
void const *  buffer,
uint32_t  lba,
uint16_t  block_count,
tuh_msc_complete_cb_t  complete_cb,
uintptr_t  arg 
)

Definition at line 244 of file msc_host.c.

Variable Documentation

◆ C

C
extern
Initial value:
{
#endif
#ifndef CFG_TUH_MSC_MAXLUN
#define CFG_TUH_MSC_MAXLUN 4
#endif
typedef struct {
msc_cbw_t const* cbw;
msc_csw_t const* csw;
void* scsi_data;
uintptr_t user_arg;
}tuh_msc_complete_data_t
AUDIO Channel Cluster Descriptor (4.1)
Definition: audio.h:647