WIC

概述

WIC(wake-up interrupt controller,唤醒中断控制器)用于中断检测并将处理器从深度睡眠模式唤醒。

WQ WIC 模块提供接口控制唤醒当前 core 以及当前 core 唤醒其他 core 的 API,并可以让其保持通电状态的接口。

用法流程

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_init(void)

Init wakeup interrupt controller driver.

参见

WQ_RET

返回:

WQ_RET

WQ_RET wq_wic_deinit(void)

Deinit wakeup interrupt controller driver.

参见

WQ_RET

返回:

WQ_RET

WQ_RET wq_wic_awake(WQ_CORES core)

Instantly wakes up a core once.

参见

WQ_RET

参数:

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.

参见

WQ_RET

参数:
  • 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.

参见

WQ_RET

参数:

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.

参见

WQ_RET

参数:

handler -- [in] WIC wakeup hander

返回:

WQ_RET

bool wq_wic_if_be_trigger(void)

Determine whether to prevent sleep.

参见

bool

返回:

bool

void wq_wic_set_trigger_data(void *data)

Set wic scratch addr.

参数:

data -- Pointer of wic trigger control data.

void *wq_wic_get_trigger_data(void)

Get wic scratch addr.

返回:

void* Pointer of wic trigger control data.

Variables

wic_trigger_t *wic_trigger
struct wic_trigger_t

Public Members

uint32_t to[WQ_CORES_MAX]
struct wic_trigger_t::[anonymous] from[WQ_CORES_MAX]