天嵌二次封装库使用手册  V2.1.2
tq_pwm.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_TQPWM_TQ_PWM_H_
8 #define LINUX_LIBV2_SOURCE_TQPWM_TQ_PWM_H_
9 
10 // Copyright 2024 广东省天嵌嵌入式技术股份有限公司
11 
12 #ifdef __cplusplus
13 #define PWM_API extern "C"
14 #else
15 #define PWM_API
16 #endif
17 
23  PWM_API int tq_pwm_enable(int node, int enable);
24 
32  PWM_API int tq_set_pwm(int node, unsigned long period, unsigned long duty_cycle);
33 
38  PWM_API int tq_pwm_test();
39 
40 #endif
#define PWM_API
Definition: tq_pwm.h:15
PWM_API int tq_pwm_test()
测试pwm_enable()和tq_set_pwm()这两个函数
PWM_API int tq_set_pwm(int node, unsigned long period, unsigned long duty_cycle)
设置 PWM 的周期、占空比
PWM_API int tq_pwm_enable(int node, int enable)
PWM 开启/关闭