BLE5.2 1.0
开发文档说明
函数 | 变量
xc_drv_aotimer.c 文件参考

Target xinchip aotimer driver implementation 更多...

浏览源代码.

函数

void xc_aotimer_init (uint8_t reg_idx, AOTimer_InitCfg_t *init_cfg)
 xc_aotimer_init
 
static uint32_t xc_aotimer_us_to_ticks (uint32_t us)
 xc_aotimer_us_to_ticks
 
void xc_aotimer_set_value (uint8_t reg_idx, uint32_t us)
 xc_aotimer_set_value
 
void xc_aotimer_start (uint8_t reg_idx)
 xc_aotimer_start
 
void xc_aotimer_stop (uint8_t reg_idx)
 xc_aotimer_stop
 
void AOTIMER0_Handler (void)
 AOTIMER0_Handler
 
void AOTIMER1_Handler (void)
 AOTIMER1_Handler
 
__WEAK void aotimer0_callback (void *context)
 aotimer0_callback
 
__WEAK void aotimer1_callback (void *context)
 aotimer1_callback
 

变量

static bool aotimer_rst_flag = false
 
aotimer_handler_callback aotimer_n_callback [2]
 

详细描述

Target xinchip aotimer driver implementation

Target xc aotimer driver implementation

_ __ _ ________ _
| |/ /(_)___ / ____/ /_ (_)___
| // / __ \/ / / __ \/ / __ \
/ |/ / / / / /___/ / / / / /_/ /
/_/|_/_/_/ /_/\____/_/ /_/_/ .___/
/_/
(C) 2022-2025 XinChip
作者
( XinChip ) Alex-J
( XinChip )

在文件 xc_drv_aotimer.c 中定义.

函数说明

◆ aotimer0_callback()

__WEAK void aotimer0_callback ( void *  context)

aotimer0_callback

AOTIMER0 Interrupt the callback function

参数
[in]void
[out]void
返回值
void

在文件 xc_drv_aotimer.c204 行定义.

◆ AOTIMER0_Handler()

void AOTIMER0_Handler ( void  )

AOTIMER0_Handler

AOTIMER0 Interrupt function

参数
[in]void
[out]void
返回值
void

在文件 xc_drv_aotimer.c170 行定义.

◆ aotimer1_callback()

__WEAK void aotimer1_callback ( void *  context)

aotimer1_callback

AOTIMER1 Interrupt the callback function

参数
[in]void
[out]void
返回值
void

在文件 xc_drv_aotimer.c217 行定义.

◆ AOTIMER1_Handler()

void AOTIMER1_Handler ( void  )

AOTIMER1_Handler

AOTIMER1 Interrupt function

参数
[in]void
[out]void
返回值
void

在文件 xc_drv_aotimer.c187 行定义.

◆ xc_aotimer_init()

void xc_aotimer_init ( uint8_t  reg_idx,
AOTimer_InitCfg_t init_cfg 
)

xc_aotimer_init

Example Initialize the aotimer according to its number

参数
[in]reg_idx: aotimer number idx; AOTIMER0_IDX or AOTIMER1_IDX
[in]*init_cfg: This is the structure parameter that the AOTimer initializes
[out]void
返回值
void

在文件 xc_drv_aotimer.c57 行定义.

◆ xc_aotimer_set_value()

void xc_aotimer_set_value ( uint8_t  reg_idx,
uint32_t  us 
)

xc_aotimer_set_value

Set the timing time according to the aotimer number

参数
[in]reg_idx: aotimer number idx; AOTIMER0_IDX or AOTIMER1_IDX
[in]us: Time set by the timer (Microsecond is the smallest unit)
[out]void
返回值
void

在文件 xc_drv_aotimer.c115 行定义.

◆ xc_aotimer_start()

void xc_aotimer_start ( uint8_t  reg_idx)

xc_aotimer_start

Start the timer according to the aotimer number

参数
[in]reg_idx: aotimer number idx; AOTIMER0_IDX or AOTIMER1_IDX
[out]void
返回值
void

在文件 xc_drv_aotimer.c135 行定义.

◆ xc_aotimer_stop()

void xc_aotimer_stop ( uint8_t  reg_idx)

xc_aotimer_stop

Stop the timer according to the aotimer number

参数
[in]reg_idx: aotimer number idx; AOTIMER0_IDX or AOTIMER1_IDX
[out]void
返回值
void

在文件 xc_drv_aotimer.c156 行定义.

◆ xc_aotimer_us_to_ticks()

static uint32_t xc_aotimer_us_to_ticks ( uint32_t  us)
static

xc_aotimer_us_to_ticks

Returns the number of ticks according to the time to be set by the aotimer

参数
[in]us: Time set by the timer (Microsecond is the smallest unit)
[out]void
返回值
ticks( Tick count )

在文件 xc_drv_aotimer.c92 行定义.

变量说明

◆ aotimer_n_callback

aotimer_handler_callback aotimer_n_callback[2]
初始值:
__WEAK void aotimer1_callback(void *context)
aotimer1_callback
__WEAK void aotimer0_callback(void *context)
aotimer0_callback

在文件 xc_drv_aotimer.c38 行定义.

◆ aotimer_rst_flag

bool aotimer_rst_flag = false
static

在文件 xc_drv_aotimer.c33 行定义.