天嵌二次封装库使用手册
V2.1.2
首页
类
文件
文件列表
文件成员
lib_pwm.h
浏览该文件的文档.
1
7
#ifndef LINUX_LIBV2_SOURCE_PWM_LIB_PWM_H_
8
#define LINUX_LIBV2_SOURCE_PWM_LIB_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
pwm_enable
(
int
node,
int
enable);
24
32
PWM_API
int
set_pwm
(
int
node,
unsigned
long
period,
unsigned
long
duty_cycle);
33
38
PWM_API
int
pwm_test
();
39
40
#endif
PWM_API
#define PWM_API
Definition:
lib_pwm.h:15
pwm_enable
PWM_API int pwm_enable(int node, int enable)
PWM 开启/关闭
pwm_test
PWM_API int pwm_test()
测试pwm_enable()和set_pwm()这两个函数
set_pwm
PWM_API int set_pwm(int node, unsigned long period, unsigned long duty_cycle)
设置 PWM 的周期、占空比
tqinclude
pwm
lib_pwm.h
制作者
1.8.11