aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/multi/USB_CDC
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-11-08 09:49:56 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-11-08 09:49:56 +0000
commitd375f4e9ac2891a5037f8acc0ebf484ce424386d (patch)
treec3d02f7b9f58566164c9964779f2292034336468 /testhal/STM32/multi/USB_CDC
parentea6a0516fdeff0d675497263e2a022f5eeef17ce (diff)
downloadChibiOS-d375f4e9ac2891a5037f8acc0ebf484ce424386d.tar.gz
ChibiOS-d375f4e9ac2891a5037f8acc0ebf484ce424386d.tar.bz2
ChibiOS-d375f4e9ac2891a5037f8acc0ebf484ce424386d.zip
Improved portab files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10971 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/multi/USB_CDC')
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.c4
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f303_discovery/portab.h2
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.c4
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f407_discovery/portab.h2
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.c11
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32f746_discovery/portab.h2
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.c4
-rw-r--r--testhal/STM32/multi/USB_CDC/cfg-stm32l476_discovery/portab.h2
-rw-r--r--testhal/STM32/multi/USB_CDC/main.c5
9 files changed, 32 insertions, 4 deletions
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
@@ -121,6 +121,11 @@ int main(void) {
chSysInit();
/*
+ * Board-dependent initialization.
+ */
+ portab_setup();
+
+ /*
* Initializes a serial-over-USB CDC driver.
*/
sduObjectInit(&PORTAB_SDU1);