Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_NUC472/pwmout_api.c
- Revision:
- 177:447f873cad2f
- Parent:
- 166:e614a9f1c9e2
--- a/targets/TARGET_NUVOTON/TARGET_NUC472/pwmout_api.c Wed Oct 11 12:45:49 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_NUC472/pwmout_api.c Wed Oct 25 14:53:38 2017 +0100
@@ -195,26 +195,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);
