Xenomai  3.1
gpiopwm.h
Go to the documentation of this file.
1 
23 #ifndef _RTDM_UAPI_PWM_H
24 #define _RTDM_UAPI_PWM_H
25 
26 #include <linux/types.h>
27 
28 #define RTPWM_PROFILE_VER 1
29 
30 struct gpiopwm {
31  unsigned int duty_cycle;
32  unsigned int range_min;
33  unsigned int range_max;
34  unsigned int period;
35  unsigned int gpio;
36 };
37 
38 #define RTIOC_TYPE_PWM RTDM_CLASS_PWM
39 
40 #define GPIOPWM_RTIOC_SET_CONFIG \
41  _IOW(RTIOC_TYPE_PWM, 0x00, struct gpiopwm)
42 
43 #define GPIOPWM_RTIOC_GET_CONFIG \
44  _IOR(RTIOC_TYPE_PWM, 0x10, struct gpiopwm)
45 
46 #define GPIOPWM_RTIOC_START \
47  _IO(RTIOC_TYPE_PWM, 0x20)
48 
49 #define GPIOPWM_RTIOC_STOP \
50  _IO(RTIOC_TYPE_PWM, 0x30)
51 
52 #define GPIOPWM_RTIOC_CHANGE_DUTY_CYCLE \
53  _IOW(RTIOC_TYPE_PWM, 0x40, unsigned int)
54 
55 
56 #endif /* !_RTDM_UAPI_TESTING_H */