diff options
Diffstat (limited to 'os/hal/boards')
-rw-r--r-- | os/hal/boards/ST_STM32F746G_DISCOVERY/board.c | 8 | ||||
-rw-r--r-- | os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c b/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c index c340f41d6..02873cd62 100644 --- a/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c @@ -95,10 +95,10 @@ bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { * @brief SDC card write protection detection.
*/
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
-
- (void)sdcp;
- /* TODO: Fill the implementation.*/
- return false;
+ + (void)sdcp; + + return !palReadPad(GPIOC, GPIOC_SD_DETECT);
}
#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 923e407a2..b2d7d8294 100644 --- a/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg +++ b/os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg @@ -10,7 +10,12 @@ </configuration_settings>
<board_name>STMicroelectronics STM32F746G-Discovery</board_name>
<board_id>ST_STM32F746G_DISCOVERY</board_id>
- <board_functions></board_functions>
+ <board_functions>
+ <sdc_lld_is_write_protected><![CDATA[
+ (void)sdcp;
+
+ return !palReadPad(GPIOC, GPIOC_SD_DETECT);]]></sdc_lld_is_write_protected>
+ </board_functions>
<headers></headers>
<ethernet_phy>
<identifier>MII_LAN8742A_ID</identifier>
|