aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2016-08-16 18:00:59 +0300
committerbarthess <barthess@yandex.ru>2016-08-16 18:00:59 +0300
commite1601e0a7d9b805422e511ea1c29ef9f5ca6000b (patch)
treeddb216c2154de22cb4c1c0b673ddde5f3513e855 /os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c
parenteff62993d38c32459c982440a8ed5eb67ba8b6b0 (diff)
downloadChibiOS-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.c14
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: