drivers: pwm: mcux: fix register casting
Register was wrongly casted to (void *) in one case, and unnecessarily casted in another case. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
4df3b22934
commit
45ca8090c0
1 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ static int pwm_mcux_init(const struct device *dev)
|
|||
|
||||
/* Disable fault sources */
|
||||
for (i = 0; i < FSL_FEATURE_PWM_FAULT_CH_COUNT; i++) {
|
||||
((PWM_Type *)config->base)->SM[config->index].DISMAP[i] = 0x0000;
|
||||
config->base->SM[config->index].DISMAP[i] = 0x0000;
|
||||
}
|
||||
|
||||
data->channel[0].pwmChannel = kPWM_PwmA;
|
||||
|
@ -176,7 +176,7 @@ static const struct pwm_driver_api pwm_mcux_driver_api = {
|
|||
PINCTRL_DT_INST_DEFINE(n); \
|
||||
\
|
||||
static const struct pwm_mcux_config pwm_mcux_config_ ## n = { \
|
||||
.base = (void *)DT_REG_ADDR(DT_INST_PARENT(n)), \
|
||||
.base = (PWM_Type *)DT_REG_ADDR(DT_INST_PARENT(n)), \
|
||||
.index = DT_INST_PROP(n, index), \
|
||||
.mode = kPWM_EdgeAligned, \
|
||||
.prescale = kPWM_Prescale_Divide_128, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue