RocketLogger  2.0.1
pwm.h
Go to the documentation of this file.
1 
32 #ifndef PWM_H_
33 #define PWM_H_
34 
37 #define PWMSS0_SYSFS_PATH "/sys/class/pwm/pwmchip0/"
39 #define PWMSS1_SYSFS_PATH "/sys/class/pwm/pwmchip2/"
40 
42 #define EPWM0A_SYSFS_INDEX 0
44 #define EPWM1A_SYSFS_INDEX 0
46 #define EPWM1B_SYSFS_INDEX 1
47 
49 #define EPWM0A_SYSFS_PATH PWMSS0_SYSFS_PATH "pwm-0:0/"
51 #define EPWM1A_SYSFS_PATH PWMSS1_SYSFS_PATH "pwm-2:0/"
53 #define EPWM1B_SYSFS_PATH PWMSS1_SYSFS_PATH "pwm-2:1/"
54 
56 #define PWM_PERIOD_DEFAULT 490
58 #define PWM_DUTY_CYCLE_DEFAULT (PWM_PERIOD_DEFAULT / 2)
59 
67 int pwm_init(void);
68 
74 void pwm_deinit(void);
75 
76 #endif /* PWM_H_ */
void pwm_deinit(void)
Definition: pwm.c:60
int pwm_init(void)
Definition: pwm.c:37