Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 149 of 157
Apr 1, 2013
(4). Calling the application task
The following shows the point of calling the application task.
a). If the application task uses non-OS scheduler API
Please call the application task at the "Inside of the scheduler management" or "outside of the sckeduler
management".
Example)
while(1)
{
/* Scheduler processing */
R_usb_cstd_Scheduler();
if(USB_FLGSET == R_usb_cstd_CheckSchedule())
{
/* Inside of the scheduler management */
R_usb_pstd_PcdTask((USB_VP_INT)0); /* PCD Task */
R_usb_pvendor_task((USB_VP_INT)0); /* PDCD Task */
usb_pvendor_apl_task((USB_VP_INT)0); /* APL Task */
}
/* Outside of the scheduler management */
}
b). If the application task does not use non-OS scheduler API
Please call the application task at the "outside of the sckeduler management".
Example)
while(1)
{
/* Scheduler processing */
R_usb_cstd_Scheduler();
if(USB_FLGSET == R_usb_cstd_CheckSchedule())
{
R_usb_pstd_PcdTask((USB_VP_INT)0); /* PCD Task */
R_usb_pvendor_task((USB_VP_INT)0); /* PDCD Task */
}
/* Outside of the scheduler management */
usb_pvendor_apl_task((USB_VP_INT)0); /* APL Task */
}
9.2 How to register in RTOS
To register class drivers or applications in RTOS, the uITRON resources, such as task, mailbox, and memory pool, must
be added to the configuration file.
For details about uITRON, refer to chapter “
8 uITRON system”.