mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c
Dependents: Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_M480/pwmout_api.c
- Revision:
- 176:447f873cad2f
- Parent:
- 172:7d866c31b3c5
--- a/targets/TARGET_NUVOTON/TARGET_M480/pwmout_api.c Wed Oct 11 12:45:49 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_M480/pwmout_api.c Wed Oct 25 14:53:38 2017 +0100 @@ -167,26 +167,6 @@ pwmout_config(obj, 1); } -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) { - EPWM_T *pwm_base = (EPWM_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, int start) { EPWM_T *pwm_base = (EPWM_T *) NU_MODBASE(obj->pwm);