WIC
概述
WIC(wake-up interrupt controller,唤醒中断控制器)用于中断检测并将处理器从深度睡眠模式唤醒。
WQ WIC 模块提供接口控制唤醒当前 core 以及当前 core 唤醒其他 core 的 API,并可以让其保持通电状态的接口。
用法流程
初始化
wq_wic_init()唤醒一个 core
wq_wic_awake()唤醒 core,并让其保持唤醒
wq_wic_keep_poweron()释放一个 core 的唤醒状态
wq_wic_release()注册一个当前 core 中断唤醒后函数句柄
wq_wic_register_wakeup_handle()
API 介绍
This section introduces the WIC module's functions and how to use this driver.
Typedefs
-
typedef void (*wq_wic_awake_callback_t)(WQ_CORES core)
Trigger remote core awake down.
- Param core:
awakened core
-
typedef void (*wq_wic_wakeup_handle_t)(WQ_CORES core)
Current core wakeup by remote core.
- Param core:
the core that wakes us up
Functions
-
WQ_RET wq_wic_awake(WQ_CORES core)
Instantly wakes up a core once.
参见
- 参数:
core -- [in] CORE to be awake
- 返回:
WQ_RET
-
WQ_RET wq_wic_keep_poweron(WQ_CORES core, wq_wic_awake_callback_t cb)
Instantly wakes up a core and keep it poweron, when success invoke the callback.
参见
- 参数:
core -- [in] CORE to be awake
cb -- [in] the function to be invoked when core wakeup
- 返回:
WQ_RET
-
WQ_RET wq_wic_release(WQ_CORES core)
Release a core's awaking status.
参见
- 参数:
core -- [in] CORE to be release
- 返回:
WQ_RET
-
WQ_RET wq_wic_register_wakeup_handle(wq_wic_wakeup_handle_t handler)
Register wakeup interrupt controller wakeup int handler.
参见
- 参数:
handler -- [in] WIC wakeup hander
- 返回:
WQ_RET
-
bool wq_wic_if_be_trigger(void)
Determine whether to prevent sleep.
参见
bool
- 返回:
bool