mbed
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_NANO100/pwmout_api.c
- Revision:
- 177:447f873cad2f
- Parent:
- 175:b96e65c34a4d
diff -r af195413fb11 -r 447f873cad2f targets/TARGET_NUVOTON/TARGET_NANO100/pwmout_api.c --- a/targets/TARGET_NUVOTON/TARGET_NANO100/pwmout_api.c Wed Oct 11 12:45:49 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_NANO100/pwmout_api.c Wed Oct 25 14:53:38 2017 +0100 @@ -176,26 +176,6 @@ pwmout_config(obj); } -int pwmout_allow_powerdown(void) -{ - uint32_t modinit_mask = pwm_modinit_mask; - while (modinit_mask) { - int pwm_idx = nu_ctz(modinit_mask); - const struct nu_modinit_s *modinit = pwm_modinit_tab + pwm_idx; - if (modinit->modname != NC) { - PWM_T *pwm_base = (PWM_T *) NU_MODBASE(modinit->modname); - uint32_t chn = NU_MODSUBINDEX(modinit->modname); - // Disallow entering power-down mode if PWM counter is enabled. - if (pwm_base->OE & (1 << chn)) { - return 0; - } - } - modinit_mask &= ~(1 << pwm_idx); - } - - return 1; -} - static void pwmout_config(pwmout_t* obj) { PWM_T *pwm_base = (PWM_T *) NU_MODBASE(obj->pwm);