diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-10-06 08:55:51 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-10-06 08:55:51 +0000 |
commit | fc2684e554cb523abed4f5e5485162f603ea88c4 (patch) | |
tree | 78f6dee55eff4ce124a1f00c08eb9af5972d4449 /os/hal/boards/ST_STM32F746G_DISCOVERY | |
parent | 05e3b285288d1e87b73c8020b63d264ff14be805 (diff) | |
download | ChibiOS-fc2684e554cb523abed4f5e5485162f603ea88c4.tar.gz ChibiOS-fc2684e554cb523abed4f5e5485162f603ea88c4.tar.bz2 ChibiOS-fc2684e554cb523abed4f5e5485162f603ea88c4.zip |
Fixed SD card detection on STM32F7-Discovery.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8344 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards/ST_STM32F746G_DISCOVERY')
-rw-r--r-- | os/hal/boards/ST_STM32F746G_DISCOVERY/board.c | 16 | ||||
-rw-r--r-- | os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c b/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c index 02873cd62..2c595e5e8 100644 --- a/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c @@ -85,20 +85,20 @@ void __early_init(void) { * @brief SDC card detection.
*/
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
-
- (void)sdcp;
- /* TODO: Fill the implementation.*/
- return true;
+ + (void)sdcp; + + return !palReadPad(GPIOC, GPIOC_SD_DETECT);
}
/**
* @brief SDC card write protection detection.
*/
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
- - (void)sdcp; - - return !palReadPad(GPIOC, GPIOC_SD_DETECT);
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
}
#endif /* HAL_USE_SDC */
diff --git a/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg b/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg index b2d7d8294..ecd64ea91 100644 --- a/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg +++ b/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg @@ -11,10 +11,10 @@ <board_name>STMicroelectronics STM32F746G-Discovery</board_name>
<board_id>ST_STM32F746G_DISCOVERY</board_id>
<board_functions>
- <sdc_lld_is_write_protected><![CDATA[
+ <sdc_lld_is_card_inserted><![CDATA[
(void)sdcp;
- return !palReadPad(GPIOC, GPIOC_SD_DETECT);]]></sdc_lld_is_write_protected>
+ return !palReadPad(GPIOC, GPIOC_SD_DETECT);]]></sdc_lld_is_card_inserted>
</board_functions>
<headers></headers>
<ethernet_phy>
|