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:
186:707f6e361f3e
--- a/targets/TARGET_NUVOTON/TARGET_M451/spi_api.c	Wed Oct 11 12:45:49 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_M451/spi_api.c	Wed Oct 25 14:53:38 2017 +0100
@@ -470,25 +470,6 @@
     return (spi_base->CTL & SPI_CTL_SPIEN_Msk);
 }
 
-int spi_allow_powerdown(void)
-{
-    uint32_t modinit_mask = spi_modinit_mask;
-    while (modinit_mask) {
-        int spi_idx = nu_ctz(modinit_mask);
-        const struct nu_modinit_s *modinit = spi_modinit_tab + spi_idx;
-        if (modinit->modname != NC) {
-            SPI_T *spi_base = (SPI_T *) NU_MODBASE(modinit->modname);
-            // Disallow entering power-down mode if SPI transfer is enabled.
-            if (spi_base->CTL & SPI_CTL_SPIEN_Msk) {
-                return 0;
-            }
-        }
-        modinit_mask &= ~(1 << spi_idx);
-    }
-    
-    return 1;
-}
-
 static int spi_writeable(spi_t * obj)
 {
     // Receive FIFO must not be full to avoid receive FIFO overflow on next transmit/receive