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 /boards | |
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 'boards')
-rw-r--r-- | boards/OLIMEX_LPC_P2148/board.c | 15 | ||||
-rw-r--r-- | boards/OLIMEX_SAM7_EX256/board.c | 15 | ||||
-rw-r--r-- | boards/OLIMEX_SAM7_P256/board.c | 15 |
3 files changed, 45 insertions, 0 deletions
diff --git a/boards/OLIMEX_LPC_P2148/board.c b/boards/OLIMEX_LPC_P2148/board.c index d55fc61d4..b7e72f7c3 100644 --- a/boards/OLIMEX_LPC_P2148/board.c +++ b/boards/OLIMEX_LPC_P2148/board.c @@ -65,6 +65,21 @@ void __early_init(void) { lpc214x_clock_init();
}
+#if HAL_USE_MMC_SPI
+/* Board-related functions related to the MMC_SPI driver.*/
+bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return !palReadPad(IOPORT2, PB_CP1);
+}
+
+bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return palReadPad(IOPORT2, PB_WP1);
+}
+#endif
+
/*
* Board-specific initialization code.
*/
diff --git a/boards/OLIMEX_SAM7_EX256/board.c b/boards/OLIMEX_SAM7_EX256/board.c index 2d4d2966e..7b4f016f5 100644 --- a/boards/OLIMEX_SAM7_EX256/board.c +++ b/boards/OLIMEX_SAM7_EX256/board.c @@ -74,6 +74,21 @@ void __early_init(void) { at91sam7_clock_init();
}
+#if HAL_USE_MMC_SPI
+/* Board-related functions related to the MMC_SPI driver.*/
+bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return !palReadPad(IOPORT2, PIOB_MMC_CP);
+}
+
+bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return palReadPad(IOPORT2, PIOB_MMC_WP);
+}
+#endif
+
/*
* Board-specific initialization code.
*/
diff --git a/boards/OLIMEX_SAM7_P256/board.c b/boards/OLIMEX_SAM7_P256/board.c index bb79437a8..60c6b2761 100644 --- a/boards/OLIMEX_SAM7_P256/board.c +++ b/boards/OLIMEX_SAM7_P256/board.c @@ -68,6 +68,21 @@ void __early_init(void) { at91sam7_clock_init();
}
+#if HAL_USE_MMC_SPI
+/* Board-related functions related to the MMC_SPI driver.*/
+bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return !palReadPad(IOPORT1, PIOA_MMC_CP);
+}
+
+bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ return palReadPad(IOPORT1, PIOA_MMC_WP);
+}
+#endif
+
/*
* Board-specific initialization code.
*/
|