From d375f4e9ac2891a5037f8acc0ebf484ce424386d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 8 Nov 2017 09:49:56 +0000 Subject: Improved portab files. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10971 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c | 4 ++++ testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h | 2 +- testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c | 4 ++++ testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h | 2 +- testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c | 11 +++++++++++ testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h | 2 +- testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c | 4 ++++ testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h | 2 +- testhal/STM32/multi/USB_CDC/main.c | 5 +++++ 9 files changed, 32 insertions(+), 4 deletions(-) (limited to 'testhal') diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c b/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c index 0918c108c..8ab191970 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c @@ -48,4 +48,8 @@ /* Module exported functions. */ /*===========================================================================*/ +void portab_setup(void) { + +} + /** @} */ diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h b/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h index ac509cc13..66d6960c5 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h @@ -65,7 +65,7 @@ #ifdef __cplusplus extern "C" { #endif - + void portab_setup(void); #ifdef __cplusplus } #endif diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c b/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c index 0918c108c..8ab191970 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c @@ -48,4 +48,8 @@ /* Module exported functions. */ /*===========================================================================*/ +void portab_setup(void) { + +} + /** @} */ diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h b/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h index 70e918219..123349a97 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h @@ -58,7 +58,7 @@ #ifdef __cplusplus extern "C" { #endif - + void portab_setup(void); #ifdef __cplusplus } #endif diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c b/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c index 0918c108c..37df4249b 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c @@ -22,6 +22,7 @@ * @{ */ +#include "hal.h" #include "portab.h" /*===========================================================================*/ @@ -48,4 +49,14 @@ /* Module exported functions. */ /*===========================================================================*/ +void portab_setup(void) { + + /* + * ARD_D13 is programmed as output (board LED). + */ + palClearLine(LINE_ARD_D13); + palSetLineMode(LINE_ARD_D13, PAL_MODE_OUTPUT_PUSHPULL); + +} + /** @} */ diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h b/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h index 6fae89c5c..56e84c198 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h @@ -58,7 +58,7 @@ #ifdef __cplusplus extern "C" { #endif - + void portab_setup(void); #ifdef __cplusplus } #endif diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c b/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c index 0918c108c..8ab191970 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c @@ -48,4 +48,8 @@ /* Module exported functions. */ /*===========================================================================*/ +void portab_setup(void) { + +} + /** @} */ diff --git a/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h b/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h index d75c4c3c8..cf783dfd9 100644 --- a/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h +++ b/testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h @@ -58,7 +58,7 @@ #ifdef __cplusplus extern "C" { #endif - + void portab_setup(void); #ifdef __cplusplus } #endif diff --git a/testhal/STM32/multi/USB_CDC/main.c b/testhal/STM32/multi/USB_CDC/main.c index e4468cb1f..52f1346d1 100644 --- a/testhal/STM32/multi/USB_CDC/main.c +++ b/testhal/STM32/multi/USB_CDC/main.c @@ -120,6 +120,11 @@ int main(void) { halInit(); chSysInit(); + /* + * Board-dependent initialization. + */ + portab_setup(); + /* * Initializes a serial-over-USB CDC driver. */ -- cgit v1.2.3