aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/boards/ST_STM32F746G_DISCOVERY
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-09-29 08:42:00 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-09-29 08:42:00 +0000
commit4aea87925ed88c86e2e3475aa031c6a80920b829 (patch)
treee81d339be6b30c3d31199a1180eb44813cb4a8b1 /os/hal/boards/ST_STM32F746G_DISCOVERY
parentbd746baee2d88ed193cf55a85bb284b3c8cf59cc (diff)
downloadChibiOS-4aea87925ed88c86e2e3475aa031c6a80920b829.tar.gz
ChibiOS-4aea87925ed88c86e2e3475aa031c6a80920b829.tar.bz2
ChibiOS-4aea87925ed88c86e2e3475aa031c6a80920b829.zip
STM32F746 demo complete.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8334 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards/ST_STM32F746G_DISCOVERY')
-rw-r--r--os/hal/boards/ST_STM32F746G_DISCOVERY/board.c8
-rw-r--r--os/hal/boards/ST_STM32F746G_DISCOVERY/cfg/board.chcfg7
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>