X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fpwm_at91.h;h=5d362894707c80a79b95110e9b38964f48d6b69c;hb=4a3929fcd14a8dc8c84d8ad8b794f11de02f1fbc;hp=76c8b940067191bfed5986f24c94014fb5aeb0db;hpb=0fbabc305e65dfc5538cfcae10c04f6be9daf657;p=bertos.git diff --git a/bertos/cpu/arm/drv/pwm_at91.h b/bertos/cpu/arm/drv/pwm_at91.h index 76c8b940..5d362894 100644 --- a/bertos/cpu/arm/drv/pwm_at91.h +++ b/bertos/cpu/arm/drv/pwm_at91.h @@ -33,7 +33,6 @@ * * \brief PWM hardware-specific definition * - * \version $Id$ * * \author Daniele Basile */ @@ -41,7 +40,7 @@ #ifndef DRV_PWM_AT91_H #define DRV_PWM_AT91_H -#include "pwm_map.h" +#include "hw/pwm_map.h" #include #include @@ -63,6 +62,7 @@ typedef uint16_t pwm_period_t; typedef struct PwmChannel { bool duty_zero; ///< True if duty cyle is zero, false otherwise. + bool pol; ///< PWM polarty flag. int pwm_pin; ///< PWM pin. reg32_t *mode_reg; ///< PWM mode register. reg32_t *duty_reg; ///< PWM duty cycle register. @@ -77,6 +77,7 @@ void pwm_hw_setFrequency(PwmDev dev, uint32_t freq); void pwm_hw_setDutyUnlock(PwmDev dev, uint16_t duty); void pwm_hw_disable(PwmDev dev); void pwm_hw_enable(PwmDev dev); +void pwm_hw_setPolarity(PwmDev dev, bool pol); pwm_period_t pwm_hw_getPeriod(PwmDev dev); #endif /* DRV_ADC_AT91_H */