Renesas USB Device
USB Host Mass Storage Class Driver(HMSC)
R01AN0513EJ0110 Rev.1.10
Page 27 of 55
Aug 10, 2011
5.3
DDI Function Details
Table 5.2
R_usb_hmsc_Initialized()
Name Initialize
HMSCD
Call format
void R_usb_hmsc_Initialized(uint16_t data1, uint16_t data2)
uint16_t data1
Not
used
Arguments
uint16_t data2
Not
used
Return values
void
Description
Initializes an internal variable of HMSCD.
Notes
The value of usb_ghmsc_CbwTagNo is initialized to 1.
Table 5.3
R_usb_hmsc_ClassCheck()
Name
Check Connected Device
Call format
void R_usb_hmsc_ClassCheck(uint16_t **table)
Arguments uint16_t
**table
[0]: Device descriptor table address
[1]: Config descriptor table address
[2]: Interface descriptor table address
[3]: Search result
[4]: Type of hub device (not used)
[5]: Port number of connected device (not used)
[6]: Communication speed of connected device
[7]: Device address of connected device
Return values
void
Description
Checks the device count and drive count, and analyzes the interface descriptor table.
Confirms that the items listed below match HMSCD, and reads the serial number if
operation is possible. Updates the pipe information table with information from the bulk
endpoint descriptor table (endpoint address, max. packet size, etc.).
Interface descriptor information check
bInterfaceSubClass = USBC_ATAPI or USBC_SCSI
bInterfaceProtocol = USBC_BOTP
bNumEndpoint > USBC_TOTALEP
String descriptor information check
Serial number of 12 or more characters (warning indication in case of error)
Endpoint Descriptor information check
bmAtributes = 0x02 (bulk endpoint required)
bEndpointAdress (endpoints required for both IN and OUT)
One of the following check results is returned as Table [3].
USBC_DONE: HMSCD operation possible
USBC_ERROR: HMSCD operation not possible
Notes
The maximum connectable storage device count is defined by USBC_MAXSTRAGE.
The maximum operable drive count is defined by USBC_MAXDRIVE.
Table 5.4
R_usb_hmsc_TaskOpen()
Name Start
HMSCD
Call format
void R_usb_hmsc_TaskOpen(void)
Arguments void
Return values
void
Description Starts
HMSCD.
Notes
Summary of Contents for R8A66597
Page 56: ......