Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 91 of 157
Apr 1, 2013
R_usb_hstd_HcdTask
HCD Task
Format
void R_usb_hstd_HcdTask (USB_VP_INT stacd)
Argument
stacd Task start code (Not used)
Return Value
Description
When host, call this function regularly so that the USB H/W IP is controlled continuously by HCD.
Note
1. Besides above arguments, also set the following members of the USB Transfer Structure before calling the
function.
USB_REGADR_t ipp USB register base address
uint16_t ip USB IP number
2. Call this function in the loop that executes the scheduler processing for non-OS operations. See ”
Figure 4-2 Static
State Program Flow” for usage example
Example
void usb_smp_mainloop(void)
{
while(1)
{
/* Start non-OS scheduler */
R_usb_cstd_Scheduler();
/* Flag checking */
if(USB_FLGSET == R_usb_cstd_CheckSchedule())
{
R_usb_hstd_HcdTask((USB_VP_INT)0);
}
}