MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / USBDCore_MainRoutine

Function USBDCore_MainRoutine

bsp/ht32/libraries/usbd_library/src/usbd_code.c:181–201  ·  view source on GitHub ↗

/ * @brief USB Core Main Routine for application. * @param pCore: pointer of USB Device * @retval None ***********************************************************************************************************/

Source from the content-addressed store, hash-verified

179 * @retval None
180 ***********************************************************************************************************/
181void USBDCore_MainRoutine(USBDCore_TypeDef *pCore)
182{
183 API_USB_POWER_UP(pCore->pDriver, pCore->Info.CurrentFeature.Bits.bSelfPowered);
184
185 if (pCore->Info.CurrentStatus == USER_USB_STATE_SUSPENDED)
186 {
187 /*------------------------------------------------------------------------------------------------------*/
188 /* System Low Power call back function */
189 /*------------------------------------------------------------------------------------------------------*/
190 if (pCore->Power.CallBack_Suspend.func != NULL)
191 {
192 __DBG_USBPrintf("%06ld >LOWPOWER\r\n", ++__DBG_USBCount);
193
194 pCore->Power.CallBack_Suspend.func(pCore->Power.CallBack_Suspend.uPara);
195
196 __DBG_USBPrintf("%06ld <LOWPOWER\r\n", ++__DBG_USBCount);
197 }
198 }
199
200 return;
201}
202/*********************************************************************************************************//**
203 * @brief USB Suspend
204 * @param pCore: pointer of USB Device

Callers 1

usbd_mainroutineFunction · 0.50

Calls 1

funcMethod · 0.80

Tested by

no test coverage detected