Renesas USB Device
USB Host Mass Storage Class Driver(HMSC)
R01AN0513EJ0110 Rev.1.10
Page 37 of 55
Aug 10, 2011
Table 7.8
usb_hmsc_SmpDevReadPartition()
Name
Read PBR Sector Information
Call format
uint16_t usb_hmsc_SmpDevReadPartition(uint16_t unit, uint32_t trans_byte)
uint16_t unit
Unit
number
Arguments
uint32_t trans_byte
Transmit data length (sector count)
Return values
uint16_t
USBC_DONE
Drive
detected
USBC_ERROR
Drive not detected
Description
Searches PBR the counts the total number of drives.
Notes
Table 7.9
usb_hmsc_SmpDevCheckBootRecord()
Name
Determine Partition Type
Call format
uint16_t usb_hmsc_SmpDevCheckBootRecord(uint8_t *data, uint32_t *par_lba, uint8_t
*par_info , uint16_t flag)
uint8_t
*data
Data address read
uint32_t
*par_lba
Partition block address
uint8_t *par_info
Partition
information
Arguments
uint16_t flag
Return values
uint16_t
USBC_MBR_ADDR MBR
detected
USBC_PBR_ADDR PBR
detected
USBC_EMBR_ADDR Extended partition detected
USBC_BOOT_ERROR MBR/PBR not detected
USBC_ERROR
Other than boot record
Description
The data that is read is used to determine whether the partition type is PBR or MBR.
The determination covers all four partition types, and the block address is set.
When an extended partition exists, the type …
When the partition type cannot be identified, it is determined to be not MBR and is treated
as PBR for information checking. If it cannot be determined to be PBR,
USBC_BOOT_ERROR is returned.
Notes
Table 7.10 usb_hmsc_SmpFsiDriveClear()
Name Initialize
Drive
Call format
void usb_hmsc_SmpFsiDriveClear(uint16_t addr)
Arguments uint16_t
addr
Device
address
Return values
void
Description Initializes
drives.
Notes
All drives associated with the specified device are initialized.
Table 7.11 R_usb_hmsc_StrgDriveOpen()
Name Mount
Drive
Call format
uint16_t R_usb_hmsc_StrgDriveOpen(uint16_t side)
Arguments uint16_t
side
Return values
uint16_t
USBC_DONE
Normal
end
USBC_ERROR
Error end
Description
Mounts the drive specified by the argument. (The sector information is initialized.)
Other than a common check, an error response occurs in the following cases.
When the partition number could not be found
When the drive information could not be read successfully from the storage device
Notes
This function also supports extended partitions.
Содержание R8A66597
Страница 56: ......