sleep_and_exti.h 806 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef SLEEP_AND_EXTI_H
  2. #define SLEEP_AND_EXTI_H
  3. typedef enum
  4. {
  5. eSleepManager_Error,
  6. eSleepManager_GenericWakeup,
  7. eSleepManager_USBPlugWakeup,
  8. }
  9. eSleepManager_WakeupReason_t;
  10. typedef struct
  11. {
  12. bool (*Init)();
  13. bool (*SetUSBWakeup)( bool state );
  14. eSleepManager_WakeupReason_t (*Sleep)();
  15. eSleepManager_WakeupReason_t (*SleepTimeout)( uint32_t timeout );
  16. bool (*GetUSBPlugged)();
  17. bool (*GetUSBActive)();
  18. void (*DeInit)();
  19. }
  20. sSleepManager_Handle_t;
  21. typedef struct
  22. {
  23. void (*USBSuspendEvent)();
  24. void (*USBResumeEvent)();
  25. }
  26. sSleepManager_Notify_t;
  27. extern const sSleepManager_Handle_t SleepManagerHandle;
  28. extern const sSleepManager_Notify_t SleepManagerNotify;
  29. #endif