Renesas USB Device
USB Host Mass Storage Class Driver(HMSC)
R01AN0513EJ0110 Rev.1.10
Page 36 of 55
Aug 10, 2011
7.7
HMSDD Function Details
Table 7.4
R_usb_hmsc_StrgTaskOpen()
Name Start
HMSDD
Call format
void R_usb_hmsc_StrgTaskOpen(void)
Arguments void
Return values
void
Description
Starts HMSCD.
Initializes the max. drive count to USBC_DRIVE.
Notes
Table 7.5
R_usb_hmsc_StrgDriveSearch()
Name Search
Drive
Call format
uint16_t R_usb_hmsc_StrgDriveSearch(uint16_t addr)
Arguments uint16_t
addr
Device
address
Return values
uint16_t
USBC_DONE
Drive
detected
USBC_ERROR
Drive not detected
Description
This function checks the storage device unit count and sets usb_ghmsc_MaxLUN in the
global area. It issues an INQUIRY command to each storage device unit to confirm that
access to the device is possible. (Unit that produce a fail response are checked up to three
times.)
The function reads the logical block address = 0x00 area of all accessible units and
increments the drive count for each.
Notes
When a GetMaxUnit request produces no response, usb_ghmsc_MaxLun is set to 0.
Drive searching takes place when the device type is direct access.
Read operations use a sector size of 512 bytes.
This function only determines the number of accessible drives. It does not mount a drive.
Table 7.6
usb_hmsc_SmpDevNextDriveSearch()
Name Search
Drive
Number
Call format
uint16_t usb_hmsc_SmpDevNextDriveSearch(void)
Arguments void
Return values
uint16_t
Drive number
Description
Returns an unused drive number.
Notes
Table 7.7
usb_hmsc_SmpDevReadSectorSize()
Name
Read Sector Size
Call format
uint32_t usb_hmsc_SmpDevReadSectorSize(uint16_t side)
Arguments uint16_t
side
Drive
number
Return values
uint32_t
Sector size
Description Uses
the
READ_CAPACITY
command to read the sector size.
Notes
When the READ_CAPACITY command produces no response, a value of 512 is returned.
Содержание R8A66597
Страница 56: ......