RZT Flexible Software Package Documentation  Release v2.2.0

 
USB HMSC Interface

Detailed Description

Interface for USB HMSC functions.

Summary

The USB HMSC interface provides USB HMSC functionality.

Data Structures

struct  usb_hmsc_api_t
 

Enumerations

enum  usb_atapi_t
 
enum  usb_csw_result_t
 

Data Structure Documentation

◆ usb_hmsc_api_t

struct usb_hmsc_api_t

USB HMSC functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* storageCommand )(usb_ctrl_t *const p_ctrl, uint8_t *buf, uint8_t command, uint8_t destination)
 
fsp_err_t(* driveNumberGet )(usb_ctrl_t *const p_ctrl, uint8_t *p_drive, uint8_t destination)
 
fsp_err_t(* storageReadSector )(uint16_t drive_number, uint8_t *const buff, uint32_t sector_number, uint16_t sector_count)
 
fsp_err_t(* storageWriteSector )(uint16_t drive_number, uint8_t const *const buff, uint32_t sector_number, uint16_t sector_count)
 
fsp_err_t(* semaphoreGet )(void)
 
fsp_err_t(* semaphoreRelease )(void)
 

Field Documentation

◆ storageCommand

fsp_err_t(* usb_hmsc_api_t::storageCommand) (usb_ctrl_t *const p_ctrl, uint8_t *buf, uint8_t command, uint8_t destination)

Processing for MassStorage(ATAPI) command.

Parameters
[in]p_ctrlPointer to control structure.
[in]*bufPointer to the buffer area to store the transfer data.
[in]commandATAPI command.
[in]destinationRepresents a device address.

◆ driveNumberGet

fsp_err_t(* usb_hmsc_api_t::driveNumberGet) (usb_ctrl_t *const p_ctrl, uint8_t *p_drive, uint8_t destination)

Get number of Storage drive.

Parameters
[in]p_ctrlPointer to control structure.
[out]p_driveStore address for Drive No.
[in]destinationRepresents a device address.

◆ storageReadSector

fsp_err_t(* usb_hmsc_api_t::storageReadSector) (uint16_t drive_number, uint8_t *const buff, uint32_t sector_number, uint16_t sector_count)

Read sector information.

Parameters
[in]drive_numberDrive number.
[out]*buffPointer to the buffer area to store the transfer data.
[in]sector_numberThe sector number to start with.
[in]sector_countTransmit with the sector size of the number of times.

◆ storageWriteSector

fsp_err_t(* usb_hmsc_api_t::storageWriteSector) (uint16_t drive_number, uint8_t const *const buff, uint32_t sector_number, uint16_t sector_count)

Write sector information.

Parameters
[in]drive_numberDrive number.
[in]*buffPointer to the buffer area to store the transfer data.
[in]sector_numberThe sector number to start with.
[in]sector_countTransmit with the sector size of the number of times.

◆ semaphoreGet

fsp_err_t(* usb_hmsc_api_t::semaphoreGet) (void)

Get Semaphore.

◆ semaphoreRelease

fsp_err_t(* usb_hmsc_api_t::semaphoreRelease) (void)

Release Semaphore.

Enumeration Type Documentation

◆ usb_atapi_t

ATAPI commands

Enumerator
USB_ATAPI_TEST_UNIT_READY 

Test Unit Ready.

USB_ATAPI_REQUEST_SENSE 

Request Sense.

USB_ATAPI_FORMAT_UNIT 

Format Unit.

USB_ATAPI_INQUIRY 

Inquiry.

USB_ATAPI_MODE_SELECT6 

Mode Select6.

USB_ATAPI_MODE_SENSE6 

Mode Sense6.

USB_ATAPI_START_STOP_UNIT 

Start Stop Unit.

USB_ATAPI_PREVENT_ALLOW 

Prevent Allow.

USB_ATAPI_READ_FORMAT_CAPACITY 

Read Format Capacity.

USB_ATAPI_READ_CAPACITY 

Read Capacity.

USB_ATAPI_READ10 

Read10.

USB_ATAPI_WRITE10 

Write10.

USB_ATAPI_SEEK 

Seek.

USB_ATAPI_WRITE_AND_VERIFY 

Write and Verify.

USB_ATAPI_VERIFY10 

Verify10.

USB_ATAPI_MODE_SELECT10 

Mode Select10.

USB_ATAPI_MODE_SENSE10 

Mode Sense10.

◆ usb_csw_result_t

Command Status Wrapper (CSW)

Enumerator
USB_CSW_RESULT_SUCCESS 

CSW was successful.

USB_CSW_RESULT_FAIL 

CSW failed.

USB_CSW_RESULT_PHASE 

CSW has phase error.