/ * @brief USB Core Main Routine for application. * @param pCore: pointer of USB Device * @retval None ***********************************************************************************************************/
| 179 | * @retval None |
| 180 | ***********************************************************************************************************/ |
| 181 | void 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 |
no test coverage detected