aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h')
-rw-r--r--os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h b/os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h
index ac64fe1..7ddbd4d 100644
--- a/os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h
+++ b/os/hal/ports/TIVA/LLD/PWM/hal_pwm_lld.h
@@ -304,7 +304,7 @@ struct PWMDriver {
/**
* @brief Pointer to the PWMx registers block.
*/
- PWM_TypeDef *pwm;
+ uint32_t pwm;
};
/*===========================================================================*/
@@ -328,10 +328,10 @@ struct PWMDriver {
* @notapi
*/
#define pwm_lld_change_period(pwmp, period) \
- ((pwmp)->pwm->PWM[0].LOAD = (uint16_t)((period) - 1)); \
- ((pwmp)->pwm->PWM[1].LOAD = (uint16_t)((period) - 1)); \
- ((pwmp)->pwm->PWM[2].LOAD = (uint16_t)((period) - 1)); \
- ((pwmp)->pwm->PWM[3].LOAD = (uint16_t)((period) - 1))
+ HWREG((pwmp)->pwm + PWM_O_0_LOAD) = (uint16_t)((period) - 1); \
+ HWREG((pwmp)->pwm + PWM_O_1_LOAD) = (uint16_t)((period) - 1); \
+ HWREG((pwmp)->pwm + PWM_O_2_LOAD) = (uint16_t)((period) - 1); \
+ HWREG((pwmp)->pwm + PWM_O_3_LOAD) = (uint16_t)((period) - 1)
/*===========================================================================*/
/* External declarations. */