mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
176:447f873cad2f
Parent:
172:7d866c31b3c5
Child:
184:08ed48f1de7f
--- a/targets/TARGET_NUVOTON/TARGET_M480/serial_api.c	Wed Oct 11 12:45:49 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_M480/serial_api.c	Wed Oct 25 14:53:38 2017 +0100
@@ -710,33 +710,6 @@
     return (obj->serial.event & (event_rx | event_tx));
 }
 
-int serial_allow_powerdown(void)
-{
-    uint32_t modinit_mask = uart_modinit_mask;
-    while (modinit_mask) {
-        int uart_idx = nu_ctz(modinit_mask);
-        const struct nu_modinit_s *modinit = uart_modinit_tab + uart_idx;
-        if (modinit->modname != NC) {
-            UART_T *uart_base = (UART_T *) NU_MODBASE(modinit->modname);
-            // Disallow entering power-down mode if Tx FIFO has data to flush
-            if (! UART_IS_TX_EMPTY((uart_base))) {
-                return 0;
-            }
-            // Disallow entering power-down mode if async Rx transfer (not PDMA) is on-going
-            if (uart_base->INTEN & (UART_INTEN_RDAIEN_Msk | UART_INTEN_RXTOIEN_Msk)) {
-                return 0;
-            }
-            // Disallow entering power-down mode if async Rx transfer (PDMA) is on-going
-            if (uart_base->INTEN & UART_INTEN_RXPDMAEN_Msk) {
-                return 0;
-            }
-        }
-        modinit_mask &= ~(1 << uart_idx);
-    }
-
-    return 1;
-}
-
 static void uart0_vec_async(void)
 {
     uart_irq_async(uart0_var.obj);