English
Language : 

SH7216 Datasheet, PDF (17/32 Pages) Renesas Technology Corp – USB Mass Storage Class
SH7216 Group
USB Function Module: USB Mass Storage Class
• UsbMain.c
In UsbMain.c, interrupt factors are discriminated by the USB interrupt flag register, and functions are called
according to the interrupt type. Also, packets are sent and received between the host controller and function modules.
Table 10 UsbMain.c
File in which
Stored
UsbMain.c
Function Name
BranchOfInt0
BranchOfInt1
GetPacket
GetPacket4
GetPacket4S
PutPacket
PutPacket4
PutPacket4S
SetControlOutContents
SetUsbModule
ActBusReset
ActBusVcc
ConvRealn
ConvReflexn
Purpose
Performs a bus reset, determines endpoint0 interrupt source,
and calls a function corresponding to the interrupt
Determines endpoint1 to endpoint9 interrupt sources, and calls
a function corresponding to each interrupt
Writes data transferred from the host controller to RAM
Writes data transferred from the host controller to RAM in
longwords (ring buffer supported) (not used by this sample
program)
Writes data transferred from the host controller to RAM in
longwords (ring buffer not supported, high-speed version)
Writes data for transfer to the host controller to the USB module
Writes data for transfer to the host controller to the USB module
in longwords (ring buffer supported) (not used by this sample
program)
Writes data for transfer to the host controller to the USB module
in longwords (ring buffer not supported, high-speed version)
Overwrites data with that sent from the host
Makes USB module initial settings
Clears FIFO on receiving bus reset
Generates a USB cable connection interrupt (not used by this
sample program)
Reads data of a specified byte length from a specified address
Reads data of a specified byte length from specified addresses,
in reverse order
• DoRequest.c
During control transfer, commands sent from the host controller are decoded and processed. In this sample program,
a vendor ID of H'045B (vendor: Renesas) is used. When the customer develops a product, the customer should
obtain a vendor ID at the USB Implementers' Forum. Because vendor commands are not used,
DecVenderCommands does not perform any action. In order to use a vendor command, the customer should
develop a program.
Table 11 DoRequest.c
File in which
Stored
DoRequest.c
Function Name
DecStandardCommands
DecVenderCommands
Purpose
Decodes command issued by host controller, and processes
standard commands
Processes vendor commands
REJ06B0897-0100/Rev.1.00
July 2009
Page 17 of 32