diff options
author | barthess <barthess@yandex.ru> | 2016-08-16 18:00:59 +0300 |
---|---|---|
committer | barthess <barthess@yandex.ru> | 2016-08-16 18:00:59 +0300 |
commit | e1601e0a7d9b805422e511ea1c29ef9f5ca6000b (patch) | |
tree | ddb216c2154de22cb4c1c0b673ddde5f3513e855 /os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c | |
parent | eff62993d38c32459c982440a8ed5eb67ba8b6b0 (diff) | |
download | ChibiOS-Contrib-e1601e0a7d9b805422e511ea1c29ef9f5ca6000b.tar.gz ChibiOS-Contrib-e1601e0a7d9b805422e511ea1c29ef9f5ca6000b.tar.bz2 ChibiOS-Contrib-e1601e0a7d9b805422e511ea1c29ef9f5ca6000b.zip |
[STM32 NAND] Deleted ugly hack with EXTI interrupt instead of NAND one
Diffstat (limited to 'os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c b/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c index b37c026..e04dff6 100644 --- a/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c +++ b/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c @@ -117,13 +117,10 @@ static uint32_t calc_eccps(NANDDriver *nandp) { * @notapi */ static void nand_ready_isr_enable(NANDDriver *nandp) { -#if STM32_NAND_USE_EXT_INT - nandp->config->ext_nand_isr_enable(); -#else + nandp->nand->SR &= ~(FSMC_SR_IRS | FSMC_SR_ILS | FSMC_SR_IFS | - FSMC_SR_ILEN | FSMC_SR_IFEN); + FSMC_SR_ILEN | FSMC_SR_IFEN); nandp->nand->SR |= FSMC_SR_IREN; -#endif } /** @@ -134,11 +131,8 @@ static void nand_ready_isr_enable(NANDDriver *nandp) { * @notapi */ static void nand_ready_isr_disable(NANDDriver *nandp) { -#if STM32_NAND_USE_EXT_INT - nandp->config->ext_nand_isr_disable(); -#else + nandp->nand->SR &= ~FSMC_SR_IREN; -#endif } /** @@ -152,10 +146,8 @@ static void nand_isr_handler (NANDDriver *nandp) { osalSysLockFromISR(); -#if !STM32_NAND_USE_EXT_INT osalDbgCheck(nandp->nand->SR & FSMC_SR_IRS); /* spurious interrupt happened */ nandp->nand->SR &= ~FSMC_SR_IRS; -#endif switch (nandp->state){ case NAND_READ: |