mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c
- Revision:
- 176:447f873cad2f
- Parent:
- 165:e614a9f1c9e2
--- a/targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c Wed Oct 11 12:45:49 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c Wed Oct 25 14:53:38 2017 +0100 @@ -172,26 +172,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->CNTEN & (1 << chn)) && pwm_base->CMPDAT[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);