
USB Basic Firmware <Short Sheet>
R01AN0495EJ0100 Rev.1.00 Page 18 of 32
Apr 15, 2011
(2) Example of creating register the PCDC
Figure. 3.4 Example of coding a Peripheral Application (2)
“r_usb_PSMPL_apl.c”
void usb_pstd_MainInit(void)
{
usb_cstd_TargetInit();
usb_pstd_PrAplTitle();
/* Wait USB-H/W access enable */
usb_cstd_WaitUsbip();
/* Set ASSP pin_config */
usb_cstd_AsspConfig();
usb_cstd_SwReset();
/* Start clock */
usb_cstd_InitialClock();
/* Set pin_config */
usb_cstd_Pinconfig();
R_usb_pstd_PcdOpen();
R_usb_pstd_SmplRegistration(); Å Register the sample PDCD driver(*)
/* Condition compilation by the difference of the operating system */
#if USBC_FW_PP == USBC_FW_NONOS_PP
/* Scheduler init */
usbc_cstd_ScheInit();
usb_pstd_SetTaskPri();
#endif /* USBC_FW_PP == USBC_FW_NONOS_PP */
usb_cstd_SetHwFunction(USBC_PERI);
USBC_DLY_TSK(500);
}
*:You can also create/register thePDCD to fit your user system.
Comentários a estes Manuais