#ifndef PT_PM_H
#define PT_PM_H

#include "pt_task.h"

typedef enum {
    PM_SLEEP_MODE_NONE,
    PM_SLEEP_MODE_IDLE,
    PM_SLEEP_MODE_LIGHT,
    PM_SLEEP_MODE_DEEP,
    PM_SLEEP_MODE_STANDBY,
    PM_SLEEP_MODE_POWER_DOWN,
    PM_SLEEP_MODE_MAX
} pm_mode_t;

typedef struct {
    void (*sleep)(pm_mode_t mode);
    void (*wakeup)(void);
} pm_adapter_t;

extern void pt_pm_adapter_init(pm_adapter_t *adapter);

extern void pt_pm_init(void);

extern void pt_pm_request(pm_mode_t mode);

extern void pt_pm_release(pm_mode_t mode);

extern int  pt_task_pm(void);

#endif


