diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-03-23 15:46:55 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-03-23 15:46:55 -0600 |
commit | 5cbdd8a321b0dc7c441721d1ab4539669556fa4a (patch) | |
tree | 125054846f57af48c3a9f8918e9ce5b05479fb31 | |
parent | 9551069b5a2646be00523f74307b6ba824263483 (diff) | |
download | nuttx-5cbdd8a321b0dc7c441721d1ab4539669556fa4a.tar.gz nuttx-5cbdd8a321b0dc7c441721d1ab4539669556fa4a.tar.bz2 nuttx-5cbdd8a321b0dc7c441721d1ab4539669556fa4a.zip |
SAM4E-EK: Fixes for HSMCI compilation
-rw-r--r-- | nuttx/configs/sam4e-ek/src/sam4e-ek.h | 8 | ||||
-rw-r--r-- | nuttx/configs/sam4e-ek/src/sam_hsmci.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/configs/sam4e-ek/src/sam4e-ek.h b/nuttx/configs/sam4e-ek/src/sam4e-ek.h index 3162c0eb0..956beb970 100644 --- a/nuttx/configs/sam4e-ek/src/sam4e-ek.h +++ b/nuttx/configs/sam4e-ek/src/sam4e-ek.h @@ -74,9 +74,9 @@ # undef HAVE_HSMCI #endif -/* We need PIO interrupts on PIOA to support card detect interrupts */ +/* We need PIO interrupts on GPIOA to support card detect interrupts */ -#if defined(HAVE_HSMCI) && !defined(CONFIG_SAM34_PIOA_IRQ) +#if defined(HAVE_HSMCI) && !defined(CONFIG_SAM34_GPIOA_IRQ) # warning PIOA interrupts not enabled. No MMC/SD support. # undef HAVE_HSMCI #endif @@ -418,9 +418,9 @@ void weak_function sam_spiinitialize(void); ************************************************************************************/ #ifdef HAVE_HSMCI -int weak_function sam_hsmci_initialize(void); +int sam_hsmci_initialize(int minor); #else -# define sam_hsmci_initialize() +# define sam_hsmci_initialize(minor) (-ENOSYS) #endif /************************************************************************************ diff --git a/nuttx/configs/sam4e-ek/src/sam_hsmci.c b/nuttx/configs/sam4e-ek/src/sam_hsmci.c index c8dcc7085..b8904586a 100644 --- a/nuttx/configs/sam4e-ek/src/sam_hsmci.c +++ b/nuttx/configs/sam4e-ek/src/sam_hsmci.c @@ -136,7 +136,7 @@ int sam_hsmci_initialize(int minor) { /* Initialize card-detect GPIO. There is no write-protection GPIO. */ - sam_configpio(GPIO_MCI_CD); + sam_configgpio(GPIO_MCI_CD); /* Mount the SDIO-based MMC/SD block driver */ /* First, get an instance of the SDIO interface */ @@ -159,7 +159,7 @@ int sam_hsmci_initialize(int minor) /* Configure card detect interrupts */ - sam_pioirq(GPIO_MCI_CD); + sam_gpioirq(GPIO_MCI_CD); (void)irq_attach(MCI_CD_IRQ, sam_hsmci_cardetect); /* Then inform the HSMCI driver if there is or is not a card in the slot. */ @@ -173,7 +173,7 @@ int sam_hsmci_initialize(int minor) /* Enable card detect interrupts */ - sam_pioirqenable(MCI_CD_IRQ); + sam_gpioirqenable(MCI_CD_IRQ); } return OK; @@ -193,7 +193,7 @@ bool sam_cardinserted(int slotno) /* Get the state of the GPIO pin */ - removed = sam_pioread(GPIO_MCI_CD); + removed = sam_gpioread(GPIO_MCI_CD); fllvdbg("Slot %d inserted: %s\n", slotno, removed ? "NO" : "YES"); return !removed; |