diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-05-10 12:26:24 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-05-10 12:26:24 +0000 |
commit | 97dce7b94464b891a25170e6556daac5bb30f7ef (patch) | |
tree | 41c359d3c2297f48867eb614be59c9f91d51e65d /demos/ARM7-LPC214x-FATFS-GCC/main.c | |
parent | 6a8a643ab00e5964a3fb77e5b2394561bb797e55 (diff) | |
download | ChibiOS-97dce7b94464b891a25170e6556daac5bb30f7ef.tar.gz ChibiOS-97dce7b94464b891a25170e6556daac5bb30f7ef.tar.bz2 ChibiOS-97dce7b94464b891a25170e6556daac5bb30f7ef.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4180 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-FATFS-GCC/main.c')
-rw-r--r-- | demos/ARM7-LPC214x-FATFS-GCC/main.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/main.c b/demos/ARM7-LPC214x-FATFS-GCC/main.c index d541e4899..1b3b86848 100644 --- a/demos/ARM7-LPC214x-FATFS-GCC/main.c +++ b/demos/ARM7-LPC214x-FATFS-GCC/main.c @@ -60,15 +60,8 @@ static SPIConfig ls_spicfg = { 254
};
-/* Card insertion verification.*/
-static bool_t mmc_is_inserted(void) {
- return !palReadPad(IOPORT2, PB_CP1);
-}
-
-/* Card protection verification.*/
-static bool_t mmc_is_protected(void) {
- return palReadPad(IOPORT2, PB_WP1);
-}
+/* MMC/SD over SPI driver configuration.*/
+static MMCConfig mmccfg = {&SPID1, &ls_spicfg, &hs_spicfg};
/* Generic large buffer.*/
uint8_t fbuff[1024];
@@ -255,10 +248,8 @@ int main(void) { /*
* Initializes the MMC driver to work with SPI2.
*/
- mmcObjectInit(&MMCD1, &SPID1,
- &ls_spicfg, &hs_spicfg,
- mmc_is_protected, mmc_is_inserted);
- mmcStart(&MMCD1, NULL);
+ mmcObjectInit(&MMCD1);
+ mmcStart(&MMCD1, &mmccfg);
/*
* Creates the blinker threads.
|