1 /*
2  * Copyright (C) 2015-2021 Alibaba Group Holding Limited
3  */
4 
5 #ifndef _IO_PWM_H_
6 #define _IO_PWM_H_
7 
8 #include <stdbool.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /** @defgroup pwm_device_api
15  *  @ingroup driver_api
16  *  PWM设备节点API定义,主要是ioctl函数所用的命令id定义说明
17  *
18  *  @{
19  */
20 
21 #define IOC_PWM_BASE 'T'
22 #define IOC_PWM_ON IOC_PWM_BASE + 1         /**< 使能PWM的输出功能 */
23 #define IOC_PWM_OFF IOC_PWM_BASE + 2        /**< 关闭PWM的输出功能 */
24 #define IOC_PWM_FREQ IOC_PWM_BASE + 3       /**< 设置PWM的输出频率 */
25 #define IOC_PWM_DUTY_CYCLE IOC_PWM_BASE + 4 /**< 设置PWM的输出占空比 */
26 
27 /** @} */
28 
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif //_IO_PWM_H_
33