|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include <stdbool.h>#include <limits.h>#include "securec.h"#include "common_def.h"#include "interrupt/osal_interrupt.h"#include "tcxo.h"#include "timer_porting.h"#include "timer.h"
结构体 | |
| struct | timer_info |
| struct | soft_timer_cfg |
| struct | timers_manager |
宏定义 | |
| #define | UINT64_MAX (0xFFFFFFFFFFFFFFFFUL) |
| #define | CONFIG_TIMER_MAX_TIMERS_NUM_3 CONFIG_TIMER_MAX_TIMERS_NUM |
| #define | CONFIG_TIMER_MAX_TIMERS_NUM_EXTRA CONFIG_TIMER_MAX_TIMERS_NUM |
| #define | CUR_MAX_HARDWARE_TIMER_NUM 4 |
| #define | TIMER_SIZE_0 0 |
| #define | TIMER_SIZE_1 1 |
| #define | TIMER_SIZE_2 2 |
| #define | TIMER_SIZE_3 3 |
| #define | TIMER_SIZE_4 4 |
类型定义 | |
| typedef enum timer_flag | timer_flag_t |
| typedef struct timer_info | timer_info_t |
| typedef struct soft_timer_cfg | soft_timer_cfg_t |
| typedef struct timers_manager | timers_manager_t |
枚举 | |
| enum | timer_flag { TIMER_FLAG_NORMAL , TIMER_FLAG_PERMANENT } |
变量 | |
| timers_manager_t | g_timers_manager [8] |
| #define CONFIG_TIMER_MAX_TIMERS_NUM_3 CONFIG_TIMER_MAX_TIMERS_NUM |
| #define CONFIG_TIMER_MAX_TIMERS_NUM_EXTRA CONFIG_TIMER_MAX_TIMERS_NUM |
| #define CUR_MAX_HARDWARE_TIMER_NUM 4 |
| #define TIMER_SIZE_0 0 |
| #define TIMER_SIZE_1 1 |
| #define TIMER_SIZE_2 2 |
| #define TIMER_SIZE_3 3 |
| #define TIMER_SIZE_4 4 |
| #define UINT64_MAX (0xFFFFFFFFFFFFFFFFUL) |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2023. All rights reserved.
Description: Provides timer driver source
History:
2022-11-07, Create file.
| typedef struct soft_timer_cfg soft_timer_cfg_t |
| typedef enum timer_flag timer_flag_t |
| typedef struct timer_info timer_info_t |
| typedef struct timers_manager timers_manager_t |
| enum timer_flag |
| STATIC errcode_t soft_timer_list_cfg_get | ( | uint32_t | index, |
| soft_timer_cfg_t * | timer_info | ||
| ) |
| STATIC uint32_t timer_get_next_timer | ( | timer_index_t | index | ) |
| STATIC uint64_t timer_get_time_till_interrupt | ( | timer_index_t | index | ) |
| STATIC void timer_int_callback | ( | timer_index_t | index | ) |
| STATIC bool timer_process_timers | ( | timer_index_t | index | ) |
| STATIC void timer_set_next_timer_interrupt | ( | timer_index_t | index | ) |
| STATIC bool timer_update_timers_time | ( | timer_index_t | index, |
| uint64_t | update_amount_cycle | ||
| ) |
| timers_manager_t g_timers_manager[8] |