mbed

Fork of mbed-dev by mbed official

Revision:
177:447f873cad2f
Parent:
173:7d866c31b3c5
diff -r af195413fb11 -r 447f873cad2f targets/TARGET_NUVOTON/TARGET_M480/pwmout_api.c
--- 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);