16#if XF_HAL_TIM_IS_ENABLE
18#include "../kernel/xf_hal_dev.h"
24#define XF_HAL_TIM_TYPE XF_HAL_TIM
41#define XF_HAL_TIM_CHECK(condition, retval, format, ...) \
42 XF_CHECK(condition, retval, TAG, format, ##__VA_ARGS__)
62#if XF_HAL_LOCK_IS_ENABLE
70#if XF_HAL_LOCK_IS_ENABLE
105#if XF_HAL_LOCK_IS_ENABLE
112#if XF_HAL_LOCK_IS_ENABLE
131#if XF_HAL_LOCK_IS_ENABLE
138#if XF_HAL_LOCK_IS_ENABLE
157#if XF_HAL_LOCK_IS_ENABLE
164#if XF_HAL_LOCK_IS_ENABLE
184#if XF_HAL_LOCK_IS_ENABLE
190#if XF_HAL_LOCK_IS_ENABLE
xf_err_t xf_hal_tim_set_cb(xf_tim_num_t tim_num, xf_hal_tim_cb_t callback, void *user_data)
定时器设置中断回调函数。
xf_err_t xf_hal_tim_stop(xf_tim_num_t tim_num)
定时器停止执行。
xf_err_t xf_hal_tim_start(xf_tim_num_t tim_num, uint32_t target_ticks)
定时器开始执行。
enum _xf_hal_tim_count_dir_t xf_hal_tim_count_dir_t
定时器计数方向。
xf_err_t xf_hal_tim_set_raw_ticks(xf_tim_num_t tim_num, uint32_t ticks)
设置当前的计数值。
xf_err_t xf_hal_tim_deinit(xf_tim_num_t tim_num)
定时器反初始化函数。
uint32_t xf_hal_tim_get_raw_ticks(xf_tim_num_t tim_num)
获取当前计数值。
void(* xf_hal_tim_cb_t)(xf_tim_num_t tim_num, uint32_t ticks, void *user_data)
tim 回调函数原型。
xf_err_t xf_hal_tim_init(xf_tim_num_t tim_num, uint32_t tick_freq_hz, xf_hal_tim_count_dir_t count_dir, bool auto_reload)
定时器初始化函数。
xf_err_t xf_hal_tim_set_isr(xf_tim_num_t tim_num, xf_hal_tim_cb_t callback, void *user_data)
定时器设置中断服务函数。
uint32_t xf_tim_num_t
tim 序号。
@ XF_HAL_TIM_CMD_COUNT_DIR
@ XF_HAL_TIM_CMD_AUTO_RELOAD
@ XF_HAL_TIM_CMD_TICK_FREQ_HZ
@ XF_HAL_TIM_CMD_TARGET_TICKS
@ XF_HAL_TIM_ACTIVE_START
#define XF_ASSERT(condition, retval, tag, format,...)
xfusion 断言宏(条件 不成立 时则输出日志后返回)。
int32_t xf_err_t
整形错误类型。 错误码具体值见 xf_err_code_t.
int xf_lock_unlock(xf_lock_t lock)
解锁.
int xf_lock_lock(xf_lock_t lock)
锁定直至成功.
xf_hal_tim_callback_t isr
xf_hal_tim_config_t config
xf_err_t xf_hal_driver_close(xf_hal_dev_t *dev)
int xf_hal_driver_read(xf_hal_dev_t *dev, void *buf, size_t count)
xf_err_t xf_hal_driver_ioctl(xf_hal_dev_t *dev, uint32_t cmd, void *config)
xf_err_t xf_hal_driver_open(xf_hal_dev_t *dev, xf_hal_type_t type, uint32_t id)
int xf_hal_driver_write(xf_hal_dev_t *dev, const void *buf, size_t count)
xf_hal_dev_t * xf_hal_device_find(xf_hal_type_t type, uint32_t id)
xf_err_t xf_hal_driver_register(xf_hal_type_t type, xf_hal_flag_t flag, xf_hal_dev_create_t constructor, const xf_driver_ops_t *driver_ops)
xf_hal_dev_t * xf_hal_driver_create(xf_hal_type_t type, uint32_t id)
struct _xf_hal_tim_t xf_hal_tim_t
static xf_hal_dev_t * tim_constructor(xf_tim_num_t tim_num)
xf_err_t xf_hal_tim_register(const xf_driver_ops_t *driver_ops)
tim 设备注册。
#define XF_HAL_TIM_CHECK(condition, retval, format,...)
xf_hal 的 timer(定时器) 设备抽象。
#define XF_LOGE(tag, format,...)