zigbee tlsr8258 PWM问题
下面是PWM的接口函数。请问有详细的PWM接口函数的使用说明和相关的使用例程?
24 #ifndef HAL_PWM_H
25 #define HAL_PWM_H
26
27 #include "type_def.h"
28 #include "hal_gpio.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34
35
36 typedef struct{
37 GPIO_PORT_T port;
38 GPIO_PIN_T pin;
39 GPIO_LEVEL_T lv;
40 bool_t invert;
41 }pwm_gpio_t;
42
50 uint8_t hal_pwm_init(pwm_gpio_t *config, uint8_t sum, uint16_t pwm_freq);
51
58 uint8_t set_pwm_value(uint8_t index, uint16_t value);
59
65 uint16_t get_max_pwm_value(void);
66
72 uint8_t set_pwm_duty(uint8_t index, uint16_t duty, uint16_t precision);
73
74
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif