|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
结构体 | |
| struct | pwm_config |
| PWM配置类型定义。 更多... | |
类型定义 | |
| typedef struct pwm_config | pwm_config_t |
| PWM配置类型定义。 | |
| typedef errcode_t(* | pwm_callback_t) (uint8_t channel) |
| PWM 回调类型定义。 | |
函数 | |
| errcode_t | uapi_pwm_init (void) |
| 初始化PWM。 | |
| void | uapi_pwm_deinit (void) |
| 去初始化PWM。 | |
| errcode_t | uapi_pwm_open (uint8_t channel, const pwm_config_t *cfg) |
| 打开具有指定配置的PWM通道。 | |
| errcode_t | uapi_pwm_close (uint8_t channel) |
| 关闭指定的PWM。 | |
| errcode_t | uapi_pwm_start (uint8_t channel) |
| 开始PWM。 | |
| uint32_t | uapi_pwm_get_frequency (uint8_t channel) |
| 获取PWM工作频率。 | |
| errcode_t | uapi_pwm_isr (uint8_t channel) |
| PWM中断服务例程。 | |
| errcode_t | uapi_pwm_register_interrupt (uint8_t channel, pwm_callback_t callback) |
| 为PWM注册中断回调。 | |
| errcode_t | uapi_pwm_unregister_interrupt (uint8_t channel) |
| 去注册中断回调。 | |
| errcode_t | uapi_pwm_set_group (uint8_t group, const uint8_t *channel_set, uint32_t channel_set_len) |
| 为PWM通道分组。 | |
| errcode_t | uapi_pwm_clear_group (uint8_t group) |
| 清理PWM通道分组。 | |
| errcode_t | uapi_pwm_start_group (uint8_t group) |
| 启动指定分组的PWM。 | |
| errcode_t | uapi_pwm_stop_group (uint8_t group) |
| 停止指定分组的PWM。 | |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
Description: Provides PWM driver api
History:
2022-09-16, Create file.
| typedef errcode_t(* pwm_callback_t) (uint8_t channel) |
PWM 回调类型定义。
| typedef struct pwm_config pwm_config_t |
PWM配置类型定义。
| errcode_t uapi_pwm_clear_group | ( | uint8_t | group | ) |
清理PWM通道分组。
| errcode_t uapi_pwm_close | ( | uint8_t | channel | ) |
关闭指定的PWM。
| void uapi_pwm_deinit | ( | void | ) |
去初始化PWM。
| uint32_t uapi_pwm_get_frequency | ( | uint8_t | channel | ) |
获取PWM工作频率。
| errcode_t uapi_pwm_init | ( | void | ) |
初始化PWM。
| errcode_t uapi_pwm_isr | ( | uint8_t | channel | ) |
PWM中断服务例程。
| errcode_t uapi_pwm_open | ( | uint8_t | channel, |
| const pwm_config_t * | cfg | ||
| ) |
打开具有指定配置的PWM通道。
| errcode_t uapi_pwm_register_interrupt | ( | uint8_t | channel, |
| pwm_callback_t | callback | ||
| ) |
为PWM注册中断回调。
| errcode_t uapi_pwm_set_group | ( | uint8_t | group, |
| const uint8_t * | channel_set, | ||
| uint32_t | channel_set_len | ||
| ) |
为PWM通道分组。
| errcode_t uapi_pwm_start | ( | uint8_t | channel | ) |
开始PWM。
| errcode_t uapi_pwm_start_group | ( | uint8_t | group | ) |
启动指定分组的PWM。
| errcode_t uapi_pwm_stop_group | ( | uint8_t | group | ) |
停止指定分组的PWM。
| errcode_t uapi_pwm_unregister_interrupt | ( | uint8_t | channel | ) |
去注册中断回调。