drivers: pwm: pwm_nrfx: Fix driver suspending
This commit clears current settings of the PWM perihperal that are stored inside device structure. This makes sure that PWM period and prescaler is configured as expected after driver was suspended. Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
b4faf7fe63
commit
2d2bc55f51
1 changed files with 2 additions and 0 deletions
|
@ -288,6 +288,8 @@ static void pwm_nrfx_uninit(const struct device *dev)
|
|||
const struct pwm_nrfx_config *config = dev->config;
|
||||
|
||||
nrfx_pwm_uninit(&config->pwm);
|
||||
|
||||
memset(dev->data, 0, sizeof(struct pwm_nrfx_data));
|
||||
}
|
||||
|
||||
static int pwm_nrfx_set_power_state(uint32_t new_state,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue