|
|
|
|
/*
|
|
|
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
|
|
|
|
|
* Description: Application programming interfaces (APIs) of the PMOC
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef UAPI_PMOC_H
|
|
|
|
|
#define UAPI_PMOC_H
|
|
|
|
|
|
|
|
|
|
#include "td_type.h"
|
|
|
|
|
#include "uapi_gpio.h"
|
|
|
|
|
#include "uapi_ir.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
#if __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
#define UAPI_PMOC_WAKEUP_GPIO_MAXNUM 4
|
|
|
|
|
#define UAPI_PMOC_WAKEUP_IRKEY_MAXNUM 10
|
|
|
|
|
#define UAPI_PMOC_POWEROFF_GPIO_MAXNUM 4
|
|
|
|
|
#define UAPI_PMOC_HDMITX_ID_MAXNUM 4
|
|
|
|
|
|
|
|
|
|
#define UAPI_PMOC_FILTER_COUNT 4
|
|
|
|
|
#define UAPI_PMOC_FILTER_VALUE_COUNT 31
|
|
|
|
|
|
|
|
|
|
#define UAPI_PMOC_LSADC_CHANNEL_MAXNUM 4
|
|
|
|
|
/*
|
|
|
|
|
* keyled display type
|
|
|
|
|
* CNcomment: 前面板显示类型
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
UAPI_PMOC_NO_DISPLAY = 0, /* No display */ /* CNcomment: 前面板不显示 */
|
|
|
|
|
UAPI_PMOC_DISPLAY_DIGIT, /* Display digit */ /* CNcomment: 显示数字 */
|
|
|
|
|
UAPI_PMOC_DISPLAY_TIME, /* Display time */ /* CNcomment: 显示时间 */
|
|
|
|
|
UAPI_PMOC_DISPLAY_TYPE_MAX
|
|
|
|
|
} uapi_pmoc_display_type;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* wakeup source
|
|
|
|
|
* CNcomment: 唤醒源类型
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
UAPI_PMOC_WAKEUP_IR = 0, /* Woken by the IR module */ /* CNcomment: 被IR唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_KEYLED, /* Woken by the keyled key */ /* CNcomment: 被前面板按键唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_GPIO, /* Woken by the GPIO interrupt */ /* CNcomment: 被GPIO中断唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_LSADC, /* Woken by the LSADC */ /* CNcomment: 被LSADC按键唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_UART, /* Woken by the UART */ /* CNcomment: 被UART唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_ETH, /* Woken by the ethernet interrupt */ /* CNcomment: 被网络中断唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_USB, /* Woken by the USB interrupt */ /* CNcomment: 被USB鼠标键盘唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_VOICE, /* Woken by the VOICE */ /* CNcomment: 被语音唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_VGA = 0x10, /* Woken by the VGA */ /* CNcomment: 被VGA唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_SCART, /* Woken by the SCART */ /* CNcomment: 被SCART唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_HDMIRX_PLUGIN, /* Woken by the HDMI PLUGIN */ /* CNcomment: 被HDMI唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_HDMIRX_CEC, /* Woken by the HDMIRX CEC */ /* CNcomment: 被HDMIRX CEC唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_HDMITX_CEC, /* Woken by the HDMITX CEC */ /* CNcomment: 被HDMITX CEC唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_TIMEOUT = 0x20, /* Woken by the timing interrupt */ /* CNcomment: 被定时中断唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_SOURCE_MAX
|
|
|
|
|
} uapi_pmoc_wakeup_src;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* wakeup type
|
|
|
|
|
* CNcomment: 唤醒类型
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
UAPI_PMOC_WAKEUP_TO_DDR = 0, /* wakeup to ddr */ /* CNcomment: 原地唤醒 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_RESET, /* system reset when wakeup */ /* CNcomment: 被唤醒后系统重启 */
|
|
|
|
|
UAPI_PMOC_WAKEUP_TYPE_MAX
|
|
|
|
|
} uapi_pmoc_wakeup_type;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* cec control type
|
|
|
|
|
* CNcomment: cec控制方向
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
UAPI_PMOC_CEC_CONTROL_TYPE_BILATERAL = 0, /* CEC bilateral control */ /* CNcomment: CEC双向控制 */
|
|
|
|
|
/* TV suspends or resumes chip by CEC */ /* CNcomment: 电视通过CEC待机或唤醒芯片 */
|
|
|
|
|
UAPI_PMOC_CEC_CONTROL_TYPE_TV_TO_CHIP,
|
|
|
|
|
/* Chip suspends or resumes TV by CEC */ /* CNcomment: 芯片通过CEC待机或唤醒电视 */
|
|
|
|
|
UAPI_PMOC_CEC_CONTROL_TYPE_CHIP_TO_TV,
|
|
|
|
|
UAPI_PMOC_CEC_CONTROL_TYPE_MAX
|
|
|
|
|
} uapi_pmoc_cec_control_type;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* active standby modle
|
|
|
|
|
* CNcomment: 低功耗熄屏待机模式
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
UAPI_PMOC_ACTIVE_STANDBY_MODLE1,
|
|
|
|
|
UAPI_PMOC_ACTIVE_STANDBY_MODLE2, /* reserve */ /* CNcomment: 预留 */
|
|
|
|
|
UAPI_PMOC_ACTIVE_STANDBY_MODLE_MAX
|
|
|
|
|
} uapi_pmoc_active_standby_modle;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* wakeup frame data
|
|
|
|
|
* CNcomment: 唤醒帧数据
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
/* bitN to control value[N].0:invalid, 1:valid */ /* CNcomment: 对应value的掩码, bitN对应value[N], 0-无效,1-有效 */
|
|
|
|
|
td_u32 mask_bytes;
|
|
|
|
|
td_u8 offset; /* Filter offset */ /* CNcomment: 过滤器偏移量 */
|
|
|
|
|
td_u8 value[UAPI_PMOC_FILTER_VALUE_COUNT]; /* Filter value */ /* CNcomment: 过滤器的值 */
|
|
|
|
|
td_bool filter_valid; /* Valid filter, 0:invalid, 1:valid */ /* CNcomment: 过滤器是否有效,0-无效,1-有效 */
|
|
|
|
|
} uapi_pmoc_wakeup_frame;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* suspend param
|
|
|
|
|
* CNcomment: 待机唤醒的参数定义
|
|
|
|
|
*/
|
|
|
|
|
typedef union {
|
|
|
|
|
struct {
|
|
|
|
|
uapi_ir_code ir_type; /* ir type */ /* CNcomment: 红外遥控类型 */
|
|
|
|
|
td_u32 ir_num; /* number of ir key for wakeup */ /* CNcomment: 支持唤醒的键值对个数 */
|
|
|
|
|
/* Lower-bit value of the power key on an IR remote control */ /* CNcomment:红外遥控 power 低位键值 */
|
|
|
|
|
td_u32 ir_low_val[UAPI_PMOC_WAKEUP_IRKEY_MAXNUM];
|
|
|
|
|
/* Upper-bit value of the power key on an IR remote control */ /* CNcomment:红外遥控 power 高位键值 */
|
|
|
|
|
td_u32 ir_high_val[UAPI_PMOC_WAKEUP_IRKEY_MAXNUM];
|
|
|
|
|
} ir_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 keyled_type; /* keyled type */ /* CNcomment: 前面板类型 */
|
|
|
|
|
td_u32 wakeup_key; /* keyled wakeup key */ /* CNcomment: 前面板唤醒键值 */
|
|
|
|
|
} keyled_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 num; /* number of GPIO for wakeup */ /* CNcomment: 支持唤醒的GPIO个数 */
|
|
|
|
|
td_u8 group[UAPI_PMOC_WAKEUP_GPIO_MAXNUM]; /* GPIO group number */ /* CNcomment: GPIO管脚组号 */
|
|
|
|
|
td_u8 bit[UAPI_PMOC_WAKEUP_GPIO_MAXNUM]; /* GPIO bit number */ /* CNcomment: GPIO管脚所在组的bit号 */
|
|
|
|
|
/* GPIO interrupt type */ /* CNcomment: GPIO中断类型 */
|
|
|
|
|
uapi_gpio_interrupt_type interrupt_type[UAPI_PMOC_WAKEUP_GPIO_MAXNUM];
|
|
|
|
|
} gpio_param;
|
|
|
|
|
struct {
|
|
|
|
|
/* channel mask of LSADC */ /* CNcomment: bit0~bit3对应LSADC通道0~3,如0x3表示使能通道0和通道1 */
|
|
|
|
|
td_u32 channel_mask;
|
|
|
|
|
struct {
|
|
|
|
|
td_u16 low; /* low key value of LSADC */ /* CNcomment: LSADC唤醒键值的电压下限 */
|
|
|
|
|
td_u16 high; /* high key value of LSADC */ /* CNcomment: LSADC唤醒键值的电压上限 */
|
|
|
|
|
} key_value_range[UAPI_PMOC_LSADC_CHANNEL_MAXNUM];
|
|
|
|
|
} lsadc_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u8 wakeup_key; /* uart wakeup key */ /* CNcomment:uart唤醒键值 */
|
|
|
|
|
} uart_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 index; /* eth index:0-eth0, 1-eth1 */ /* CNcomment: 网口号 */
|
|
|
|
|
td_bool unicast_packet_enable; /* Unicast packet enable */ /* CNcomment: 单播包使能 */
|
|
|
|
|
td_bool magic_packet_enable; /* Magic packet enable */ /* CNcomment: 魔法包使能 */
|
|
|
|
|
td_bool wakeup_frame_enable; /* Wakeup Frame enable */ /* CNcomment: 唤醒帧使能 */
|
|
|
|
|
uapi_pmoc_wakeup_frame frame[UAPI_PMOC_FILTER_COUNT]; /* Filter frame */ /* CNcomment: 唤醒帧数据 */
|
|
|
|
|
/* time to deep standby(unit: s) */ /* CNcomment: 定时切换到真待机的时间(单位: 秒) */
|
|
|
|
|
td_u32 time_to_passive_standby;
|
|
|
|
|
td_bool mute_wakeup_enable; /* mute wakeup enable */ /* CNcomment: 静默唤醒使能 */
|
|
|
|
|
} eth_param;
|
|
|
|
|
struct {
|
|
|
|
|
/* usb wakeup mask: don't to be set by app */ /* CNcomment: usb 唤醒掩码,用户不需要设置 */
|
|
|
|
|
td_u32 usb_wakeup_mask;
|
|
|
|
|
} usb_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 port; /* HDMI port for wakeup */ /* CNcomment: 用于唤醒的hdmi port */
|
|
|
|
|
} hdmirx_plugin_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_bool id[UAPI_PMOC_HDMITX_ID_MAXNUM]; /* HDMITX id */ /* CNcomment: HDMI id */
|
|
|
|
|
/* cec control type */ /* CNcomment: cec控制方向 */
|
|
|
|
|
uapi_pmoc_cec_control_type cec_control[UAPI_PMOC_HDMITX_ID_MAXNUM];
|
|
|
|
|
} hdmitx_cec_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 suspend_period; /* Preconfigured Wakeup time, in second */ /* CNcomment: 唤醒定时时间 ,单位为秒 */
|
|
|
|
|
td_bool pvr_enable; /* After wakeup, start pvr */ /* CNcomment: 定时唤醒后,启动pvr标志 */
|
|
|
|
|
td_bool mute_wakeup_enable; /* mute wakeup enable */ /* CNcomment: 静默唤醒使能 */
|
|
|
|
|
} timeout_param;
|
|
|
|
|
} uapi_pmoc_suspend_param;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* param of last wakeup
|
|
|
|
|
* CNcomment: 上一次触发唤醒的参数
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
uapi_pmoc_wakeup_src source; /* Wakeup source for last wakeup */ /* CNcomment: 上一次被唤醒的唤醒源 */
|
|
|
|
|
union {
|
|
|
|
|
struct {
|
|
|
|
|
td_u32 ir_low_val; /* The ir lower-bit of last wakeup */ /* CNcomment: 上一次待机唤醒的遥控器低位键值 */
|
|
|
|
|
td_u32 ir_high_val; /* The ir high-bit of last wakeup */ /* CNcomment: 上一次待机唤醒的遥控器高位键值 */
|
|
|
|
|
} ir_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u8 group; /* GPIO group number of last wakeup */ /* CNcomment: 上一次待机唤醒的GPIO管脚组号 */
|
|
|
|
|
td_u8 bit; /* GPIO bit number of last wakeup */ /* CNcomment: 上一次待机唤醒的GPIO管脚所在组的bit号 */
|
|
|
|
|
} gpio_param;
|
|
|
|
|
struct {
|
|
|
|
|
td_u16 channel; /* LSADC channel mask of last wakeup */ /* CNcomment: 上一次待机唤醒的LSADC通道 */
|
|
|
|
|
td_u16 key_value; /* LSADC key value of last wakeup */ /* CNcomment: 上一次待机唤醒的LSADC键值 */
|
|
|
|
|
} lsadc_param;
|
|
|
|
|
} wakeup_param;
|
|
|
|
|
} uapi_pmoc_wakeup_attr;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Configures the time displayed on the front panel in standby mode.
|
|
|
|
|
* CNcomment: 待机时的前面板显示的时间配置
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
td_u32 hour; /* Hour */ /* CNcomment: 时 */
|
|
|
|
|
td_u32 minute; /* Minute */ /* CNcomment: 分 */
|
|
|
|
|
td_u32 second; /* Second */ /* CNcomment: 秒 */
|
|
|
|
|
} uapi_pmoc_display_time;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Configures the display mode of the front panel in standby mode.
|
|
|
|
|
* CNcomment: 待机时的前面板显示配置
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
td_u32 keyled_type; /* Type of the front panel */ /* CNcomment: 前面板类型 */
|
|
|
|
|
uapi_pmoc_display_type display_type; /* front panel display type */ /* CNcomment: 前面板显示类型 */
|
|
|
|
|
/* display digit,range 0 to 9999, not support hex */ /* CNcomment: 前面板显示的数字,范围0到9999,不支持16进制数 */
|
|
|
|
|
td_u32 display_value;
|
|
|
|
|
/* display type is time on the front panel */ /* CNcomment: 前面板显示的时间 */
|
|
|
|
|
uapi_pmoc_display_time display_time_info;
|
|
|
|
|
} uapi_pmoc_display_param;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Define of chip temperature
|
|
|
|
|
* CNcomment: 芯片温度结构体
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
/* The temperature of T-sensor1 in Celsius */ /* CNcomment: 芯片第一个传感器的温度,单位度 */
|
|
|
|
|
td_s32 t_sensor1_temperature;
|
|
|
|
|
td_s32 t_sensor2_temperature; /* Reserved now */ /* CNcomment: 当前保留 */
|
|
|
|
|
td_s32 t_sensor3_temperature; /* Reserved now */ /* CNcomment: 当前保留 */
|
|
|
|
|
td_s32 t_sensor4_temperature; /* Reserved now */ /* CNcomment: 当前保留 */
|
|
|
|
|
} uapi_pmoc_chip_temperature;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
/* GPIO number to be poweroff when standby */ /* CNcomment: 待机时需要下电的GPIO个数 */
|
|
|
|
|
td_u32 num;
|
|
|
|
|
/* GPIO group number to be poweroff when standby */ /* CNcomment: 待机时需要下电的GPIO管脚组号 */
|
|
|
|
|
td_u8 group[UAPI_PMOC_POWEROFF_GPIO_MAXNUM];
|
|
|
|
|
/* GPIO bit number to be poweroff when standby */ /* CNcomment: 待机时需要下电的GPIO管脚所在组的bit号 */
|
|
|
|
|
td_u8 bit[UAPI_PMOC_POWEROFF_GPIO_MAXNUM];
|
|
|
|
|
/* GPIO level to be set when standby */ /* CNcomment: 待机时GPIO配置的电平 */
|
|
|
|
|
td_u8 level[UAPI_PMOC_POWEROFF_GPIO_MAXNUM];
|
|
|
|
|
} uapi_pmoc_poweroff_gpio_param;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Starts the power management on chip (PMoC) device.
|
|
|
|
|
* CNcomment: brief 打开低功耗模块设备。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* The ARM can be switched to another operating mode and \n
|
|
|
|
|
* then to low-power mode only after the PMoC device is started.\n
|
|
|
|
|
* CNcomment: 在打开低功耗模块设备后,才能切换ARM的工作模式,继而进入低功耗状态。CNend
|
|
|
|
|
* param N/A CNcomment: 无 CNend
|
|
|
|
|
* retval: TD_SUCCESS Success CNcomment: 成功 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_FAILED_INIT The PMOC device fails to open. CNcomment: PMOC设备打开失败 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_init(void);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Stops the PMoC device.
|
|
|
|
|
* CNcomment: brief 关闭低功耗设备。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param N/A CNcomment: 无 CNend
|
|
|
|
|
* retval: TD_SUCCESS Success CNcomment: 成功 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMoC device is not started. CNcomment: 设备未打开 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_deinit(void);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Set Suspend Param.
|
|
|
|
|
* CNcomment: brief 设置唤醒源的开关、待机时唤醒源的参数属性。CNend
|
|
|
|
|
* \attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[in] source wakeup source to be set CNcomment: 唤醒源CNend
|
|
|
|
|
* param[in] enable enable or disable wakeup source CNcomment: 唤醒源的使能或关闭CNend
|
|
|
|
|
* param[in] param param of wakeup source CNcomment: 唤醒源的参数CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS set suspend information success. CNcomment: 配置成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_set_suspend_param(uapi_pmoc_wakeup_src source, td_bool enable, uapi_pmoc_suspend_param *param);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Get Suspend Param.
|
|
|
|
|
* CNcomment: brief 获取唤醒源的开关、待机时唤醒源的参数属性。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[in] source wakeup source CNcomment: 唤醒源CNend
|
|
|
|
|
* param[out] enable wakeup source enable or not CNcomment: 唤醒源是否使能CNend
|
|
|
|
|
* param[out] param param of wakeup source CNcomment: 唤醒源的参数CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS set suspend information success. CNcomment: 获取成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_get_suspend_param(uapi_pmoc_wakeup_src source, td_bool *enable, uapi_pmoc_suspend_param *param);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Set Wakeup Type.
|
|
|
|
|
* CNcomment: brief 设置唤醒的类型。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[in] wakeup_type wakeup to ddr or resume CNcomment: 唤醒类型CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS set suspend information success. CNcomment: 获取成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_set_wakeup_type(uapi_pmoc_wakeup_type wakeup_type);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Enter passive standby or deep active standby and obtains the wakeup source.
|
|
|
|
|
* CNcomment: brief 进入 passive standby或者deep active standby, 并获取实际唤醒源。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[out] wakeup_src wakeup source CNcomment: 唤醒芯片的唤醒源CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS set suspend information success. CNcomment: 获取成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_enter_standby(uapi_pmoc_wakeup_src *wakeup_src);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Get the Parameters of last wake up.
|
|
|
|
|
* CNcomment: brief 获取触发待机唤醒的参数。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[out] attr The Parameters of last waking up. CNcomment: 触发上一次唤醒的参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_POINT The pointer is invalid. CNcomment: 非法指针 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: TD_SUCCESS Getting waking up parameters succeeded. CNcomment: 获取唤醒参数成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_get_wakeup_attr(uapi_pmoc_wakeup_attr *attr);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Get the period during standby status.
|
|
|
|
|
* CNcomment: brief 获取从待机到唤醒持续的时间。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[out] standby_period The period of standby. CNcomment: 待机持续的时间 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_POINT The pointer is invalid. CNcomment: 非法指针 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_FAILED_GETPERIOD It fails to get standby period. CNcomment: 获取待机时间失败 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_get_standby_period(td_u32 *standby_period);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Switch to active standby status.
|
|
|
|
|
* CNcomment: brief 进入active standby状态。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[in] model active standby modle to switch. CNcomment: 要切换的active standby 模式 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS Standby success. CNcomment: 待机成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_enter_active_standby(uapi_pmoc_active_standby_modle model);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Quit active standby status.
|
|
|
|
|
* CNcomment: brief 退出active standby状态。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param N/A CNcomment: 无 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: TD_SUCCESS Quit standby success. CNcomment: 唤醒成功 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_quit_active_standby(td_void);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief set display content when wake up.
|
|
|
|
|
* CNcomment: brief 设置唤醒显示内容。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* content that the panel display when standby
|
|
|
|
|
* CNcomment: 待机时面板显示指定内容\n CNend
|
|
|
|
|
* param[in] display_param display content: time or channel or no display CNcomment: 显示内容:时间 or 频道 or
|
|
|
|
|
* 无显示。CNend retval: TD_SUCCESS success CNcomment: 成功 CNend retval:
|
|
|
|
|
* SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend retval:
|
|
|
|
|
* SOC_ERR_PMOC_INVALID_POINT The pointer is invalid. CNcomment: 非法指针 CNend retval:
|
|
|
|
|
* SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend retval:
|
|
|
|
|
* SOC_ERR_PMOC_FAILED_STANDBY It fails to set standby display CNcomment: 设置唤醒内容失败 CNend see \n N/A
|
|
|
|
|
* CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_set_standby_display_param(uapi_pmoc_display_param *display_param);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief when standby, GPIO pin control 12v and 5v power,relate to hardware.
|
|
|
|
|
* CNcomment: brief 用于待机时,GPIO管脚控制12V0和5V0电源,与硬件相关。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* when standby, the outside power controled by STANDBY_PWROFF pin, the function can be ignored.\n
|
|
|
|
|
* when some part of outside power controled by GPIO pin, use this function will decrease standby power.\n
|
|
|
|
|
* CNcomment:待机时外围电源全部由管脚STANDBY_PWROFF控制时,不用理会该接口;\n
|
|
|
|
|
* 当部分外围电源由GPIO管脚去控制时,合理调用该接口用于降低待机功耗。CNend
|
|
|
|
|
* param[in] param GPIO param CNcomment: GPIO管脚信息 CNend
|
|
|
|
|
* retval: TD_SUCCESS success CNcomment: 成功 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_POINT The pointer is invalid. CNcomment: 非法指针 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_FAILED_SETDEV It fails to set standby Gpio. CNcomment: 设置待机GPIO管脚失败 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_set_gpio_power_off(uapi_pmoc_poweroff_gpio_param *param);
|
|
|
|
|
|
|
|
|
|
/* CNcomment: 设置呼吸灯 */
|
|
|
|
|
td_s32 uapi_pmoc_set_breath_led(td_u8 group, td_u8 bit, td_u32 led_breath_cycle);
|
|
|
|
|
|
|
|
|
|
/* CNcomment: 设置待机灯 */
|
|
|
|
|
td_s32 uapi_pmoc_set_standby_led(td_u8 group, td_u8 bit, td_u8 level);
|
|
|
|
|
|
|
|
|
|
/* CNcomment: 客户定制化需求 */
|
|
|
|
|
td_s32 uapi_pmoc_set_mcu_msg(td_u32 msg_index, td_u32 value);
|
|
|
|
|
td_s32 uapi_pmoc_get_mcu_msg(td_u32 msg_index, td_u32 *value);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* brief Get the temperatures of the chip.
|
|
|
|
|
* CNcomment: brief 获取当前芯片的温度。CNend
|
|
|
|
|
* attention \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
* param[out] chip_temprature The temperatures of the chip sensors. CNcomment: 当前芯片中传感器的温度 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_NOT_INIT The PMOC device is not started. CNcomment: PMOC设备未打开 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_POINT The pointer is invalid. CNcomment: 非法指针 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_INVALID_PARA The parameter is invalid. CNcomment: 非法参数 CNend
|
|
|
|
|
* retval: SOC_ERR_PMOC_FAILED_GETTEMPERATURE It fails to get chip temp. CNcomment: 获取芯片温度失败 CNend
|
|
|
|
|
* see \n
|
|
|
|
|
* N/A CNcomment: 无 CNend
|
|
|
|
|
*/
|
|
|
|
|
td_s32 uapi_pmoc_get_chip_temperature(uapi_pmoc_chip_temperature *chip_temprature);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
#if __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
#endif /* UAPI_PMOC_H */
|