WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_pm_rom.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2022. All rights reserved.
3 * Description: Header file for hal_pm_rom.c.
4 */
5
6#ifndef HAL_PM_ROM_H
7#define HAL_PM_ROM_H
8
9/*****************************************************************************
10 其他头文件包含
11*****************************************************************************/
12#include "osal_types.h"
13#include "hal_common_ops_rom.h"
14#include "hal_chip_rom.h"
15
16#ifdef __cplusplus
17#if __cplusplus
18extern "C" {
19#endif
20#endif
21
22/*****************************************************************************
23 2 宏定义
24*****************************************************************************/
25#define MIN_SLEEP_TIME 1000 /* tsf小于该值不睡眠 load时间(500us)+500us裕量 */
26#define VAP0_EXT_TSF_EN_OFFSET BIT1 /* 外置TSF vap0使能位BIT1 */
27#define VAP0_EXT_TSF_WORK_STATUS_OFFSET BIT0 /* VAP0 外置TSF工作状态 */
28#define EXT_TSF_SLEEP_EN_OFFSET BIT0 /* 外置TSF使能位 */
29#define SEC_TO_NSEC 1000000000 /* 1s为1 000 000 000ns */
30#define USEC_TO_NSEC 1000 /* 1000.0ns */
31#define CHECK_MAX_TIMES 5000 /* 最大5000次检查 */
32#define CHECK_PER_TIME 1000 /* 每次1000us时延 */
33#define EXT_OFFSET_ADJ_TIME 5 /* TSF翻转后调整提前量的次数 规避偶现的异常翻转导致增大提前量 */
34#define EXT_OFFSET_ADJ_RATIO 200 /* 提前量调整比例 = TIME/RATIO 目前5/200=2.5% */
35#define EXT_OFFSET_COMP_RESV 50 /* 外置提前量补偿裕量us */
36#define PM_WLAN_TIMEOUT_INIT 0xFFFFFFUL /* WLAN超时配置 */
37typedef struct {
38 osal_u16 clk_div5; /* 0x40000050 MAC主时钟分频系数 */
39 osal_u16 ch_sel; /* 0x40000140 模拟通道与主辅路链接关系选择 */
40 osal_u16 clk_phy_sel; /* 0x40000144 PHY时钟选择 */
41 osal_u16 dtcm_mode; /* 0x40000280 dtcm冲突选择模式 */
43typedef struct {
44 osal_u32 powerdown_cnt; /* 睡眠次数,用于判断投票期间芯片是否掉电 */
45 osal_u8 state; /* 低功耗状态 */
46 osal_u8 sta_exist; /* sta是否存在 */
47 osal_u8 tsf_flip; /* 唤醒后tsf翻转次数 */
48 osal_u8 wkup_cnt; /* 唤醒次数 用于统计翻转比例 */
49 osal_u8 enable_sleep; /* 仅STA & D2D共存下使用 */
51
52typedef osal_void (*hh503_vap_cb_set_twt)(const hal_to_dmac_vap_stru *hal_vap, const twt_reg_param_stru *twt_param,
53 osal_u8 count, osal_u8 trigger);
55
56/*****************************************************************************
57 函数声明
58*****************************************************************************/
63#ifdef __cplusplus
64#if __cplusplus
65}
66#endif
67#endif
68
69#endif /* end of hal_pm_rom.h */
osal_u8 hal_pm_mode_enum_uint8
Definition hal_common_ops_device_rom.h:435
osal_void(* hal_vap_cb_pm_vote_plat)(hal_pm_mode_enum_uint8 pm_mode, hal_pm_ctrl_stru *pm_ctl)
Definition hal_pm_rom.h:54
osal_void hal_pm_enable_front_end(hal_to_dmac_device_stru *hal_device, osal_u8 enable_paldo)
osal_void(* hh503_vap_cb_set_twt)(const hal_to_dmac_vap_stru *hal_vap, const twt_reg_param_stru *twt_param, osal_u8 count, osal_u8 trigger)
Definition hal_pm_rom.h:52
osal_void hal_unmask_interrupt(osal_u32 offset)
hal_pm_ctrl_stru * hal_get_pm_ctrl(osal_void)
osal_void hal_pm_disable_front_end_tx(hal_to_dmac_device_stru *hal_device)
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
Definition hal_pm_rom.h:43
osal_u8 sta_exist
Definition hal_pm_rom.h:46
osal_u8 wkup_cnt
Definition hal_pm_rom.h:48
osal_u8 state
Definition hal_pm_rom.h:45
osal_u32 powerdown_cnt
Definition hal_pm_rom.h:44
osal_u8 enable_sleep
Definition hal_pm_rom.h:49
osal_u8 tsf_flip
Definition hal_pm_rom.h:47
Definition hal_pm_rom.h:37
osal_u16 clk_div5
Definition hal_pm_rom.h:38
osal_u16 ch_sel
Definition hal_pm_rom.h:39
osal_u16 clk_phy_sel
Definition hal_pm_rom.h:40
osal_u16 dtcm_mode
Definition hal_pm_rom.h:41
Definition hal_ops_common_rom.h:529
Definition hal_common_ops_device_rom.h:870
Definition hal_common_ops_device_rom.h:1363