From 97dce7b94464b891a25170e6556daac5bb30f7ef Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 10 May 2012 12:26:24 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4180 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-FATFS-GCC/main.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'demos/ARM7-LPC214x-FATFS-GCC') 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. -- cgit v1.2.3