aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-30 14:41:51 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-06-30 14:41:51 +0000
commitbfa477e96da26b31d6907260b72037c67cd30d3d (patch)
tree2952bac38e26a0d2afa235127c6bdf975c08856c /boards
parent503e05816d39e931a363bdc981e07715e6bfa57e (diff)
downloadChibiOS-bfa477e96da26b31d6907260b72037c67cd30d3d.tar.gz
ChibiOS-bfa477e96da26b31d6907260b72037c67cd30d3d.tar.bz2
ChibiOS-bfa477e96da26b31d6907260b72037c67cd30d3d.zip
Fixed few newly introduced documentation errors. Improved card detection.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4364 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'boards')
-rw-r--r--boards/OLIMEX_STM32_E407/board.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/boards/OLIMEX_STM32_E407/board.c b/boards/OLIMEX_STM32_E407/board.c
index 7a3aaa4e2..586ae2453 100644
--- a/boards/OLIMEX_STM32_E407/board.c
+++ b/boards/OLIMEX_STM32_E407/board.c
@@ -56,9 +56,11 @@ void __early_init(void) {
* Card detection through the card internal pull-up on D3.
*/
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+ static bool_t last_status = FALSE;
- (void)sdcp;
- return (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);
+ if (blkIsTransferring(sdcp))
+ return last_status;
+ return last_status = (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);
}
/*