aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/boards/OLIMEX_STM32_H407
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-12-13 21:17:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-12-13 21:17:22 +0000
commitc2ecbaa3070872b70aa113ece1c66df2a2b5bf97 (patch)
tree443da7344392ace818e2b0d1ec5ee08f2f9310b9 /os/hal/boards/OLIMEX_STM32_H407
parent2014cfd445d1b9b4673ca5c7ad818ff9b43289db (diff)
downloadChibiOS-c2ecbaa3070872b70aa113ece1c66df2a2b5bf97.tar.gz
ChibiOS-c2ecbaa3070872b70aa113ece1c66df2a2b5bf97.tar.bz2
ChibiOS-c2ecbaa3070872b70aa113ece1c66df2a2b5bf97.zip
Regenerated board files using latest templates.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7581 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards/OLIMEX_STM32_H407')
-rw-r--r--os/hal/boards/OLIMEX_STM32_H407/board.c43
-rw-r--r--os/hal/boards/OLIMEX_STM32_H407/board.h2
-rw-r--r--os/hal/boards/OLIMEX_STM32_H407/board.mk4
-rw-r--r--os/hal/boards/OLIMEX_STM32_H407/cfg/board.chcfg9
4 files changed, 38 insertions, 20 deletions
diff --git a/os/hal/boards/OLIMEX_STM32_H407/board.c b/os/hal/boards/OLIMEX_STM32_H407/board.c
index 7d1ab4d51..e2144859f 100644
--- a/os/hal/boards/OLIMEX_STM32_H407/board.c
+++ b/os/hal/boards/OLIMEX_STM32_H407/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS/RT - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,26 +22,43 @@
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
-const PALConfig pal_default_config =
-{
+const PALConfig pal_default_config = {
+#if STM32_HAS_GPIOA
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+#endif
+#if STM32_HAS_GPIOB
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+#endif
+#if STM32_HAS_GPIOC
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+#endif
+#if STM32_HAS_GPIOD
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+#endif
+#if STM32_HAS_GPIOE
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+#endif
+#if STM32_HAS_GPIOF
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
+#endif
+#if STM32_HAS_GPIOG
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
+#endif
+#if STM32_HAS_GPIOH
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
+#endif
+#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
+#endif
};
#endif
@@ -60,20 +77,20 @@ void __early_init(void) {
* @brief SDC card detection.
*/
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
- static bool_t last_status = FALSE;
-
- if (blkIsTransferring(sdcp))
- return last_status;
- return last_status = (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);
+ static bool last_status = false;
+
+ if (blkIsTransferring(sdcp))
+ return last_status;
+ return last_status = (bool)palReadPad(GPIOC, GPIOC_SD_D3);
}
/**
* @brief SDC card write protection detection.
*/
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
-
- (void)sdcp;
- return FALSE;
+
+ (void)sdcp;
+ return false;
}
#endif /* HAL_USE_SDC */
@@ -85,7 +102,7 @@ bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
- return TRUE;
+ return true;
}
/**
@@ -95,7 +112,7 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
- return FALSE;
+ return false;
}
#endif
diff --git a/os/hal/boards/OLIMEX_STM32_H407/board.h b/os/hal/boards/OLIMEX_STM32_H407/board.h
index e2c022694..deec1f73f 100644
--- a/os/hal/boards/OLIMEX_STM32_H407/board.h
+++ b/os/hal/boards/OLIMEX_STM32_H407/board.h
@@ -1,5 +1,5 @@
/*
- ChibiOS/RT - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/os/hal/boards/OLIMEX_STM32_H407/board.mk b/os/hal/boards/OLIMEX_STM32_H407/board.mk
index 8bd37d59d..6567ce031 100644
--- a/os/hal/boards/OLIMEX_STM32_H407/board.mk
+++ b/os/hal/boards/OLIMEX_STM32_H407/board.mk
@@ -1,5 +1,5 @@
# List of all the board related files.
-BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_H407/board.c
+BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_H407/board.c
# Required include directories
-BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_H407
+BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_H407
diff --git a/os/hal/boards/OLIMEX_STM32_H407/cfg/board.chcfg b/os/hal/boards/OLIMEX_STM32_H407/cfg/board.chcfg
index 8b4cda0b9..dfbd0f50b 100644
--- a/os/hal/boards/OLIMEX_STM32_H407/cfg/board.chcfg
+++ b/os/hal/boards/OLIMEX_STM32_H407/cfg/board.chcfg
@@ -5,24 +5,25 @@
<configuration_settings>
<templates_path>resources/gencfg/processors/boards/stm32f4xx/templates</templates_path>
<output_path>..</output_path>
+ <hal_version>3.0.x</hal_version>
</configuration_settings>
<board_name>Olimex STM32-H407</board_name>
<board_id>OLIMEX_STM32_H407</board_id>
<board_functions>
- <sdc_lld_is_card_inserted><![CDATA[ static bool_t last_status = FALSE;
+ <sdc_lld_is_card_inserted><![CDATA[ static bool last_status = false;
if (blkIsTransferring(sdcp))
return last_status;
- return last_status = (bool_t)palReadPad(GPIOC, GPIOC_SD_D3);]]></sdc_lld_is_card_inserted>
+ return last_status = (bool)palReadPad(GPIOC, GPIOC_SD_D3);]]></sdc_lld_is_card_inserted>
<sdc_lld_is_write_protected>
<![CDATA[ (void)sdcp;
- return FALSE;]]></sdc_lld_is_write_protected>
+ return false;]]></sdc_lld_is_write_protected>
</board_functions>
<ethernet_phy>
<identifier>MII_KS8721_ID</identifier>
<bus_type>RMII</bus_type>
</ethernet_phy>
- <subtype>STM32F40_41xxx</subtype>
+ <subtype>STM32F407xx</subtype>
<clocks
HSEFrequency="12000000"
HSEBypass="false"