helpfor studient
Dependents: STM32_F103-C8T6basecanblink_led
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_M480/spi_api.c
- Revision:
- 177:447f873cad2f
- Parent:
- 172:7d866c31b3c5
--- a/targets/TARGET_NUVOTON/TARGET_M480/spi_api.c Wed Oct 11 12:45:49 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_M480/spi_api.c Wed Oct 25 14:53:38 2017 +0100 @@ -461,25 +461,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