From 73666c78a03f8db1c8b2eda4ccb0a54c72949c03 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 31 Aug 2017 11:19:38 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10512 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../multi/PAL/cfg-stm32l476_discovery/portab.h | 1 + .../STM32-PAL (OpenOCD, Flash and Run).launch | 52 ---------------------- ...2L476-Discovery (OpenOCD, Flash and Run).launch | 52 ++++++++++++++++++++++ testhal/STM32/multi/PAL/main.c | 8 +++- 4 files changed, 59 insertions(+), 54 deletions(-) delete mode 100644 testhal/STM32/multi/PAL/debug/STM32-PAL (OpenOCD, Flash and Run).launch create mode 100644 testhal/STM32/multi/PAL/debug/STM32-PAL for STM32L476-Discovery (OpenOCD, Flash and Run).launch (limited to 'testhal/STM32/multi/PAL') diff --git a/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h b/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h index fd6efd3ae..b5d68b86b 100644 --- a/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h +++ b/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h @@ -30,6 +30,7 @@ /*===========================================================================*/ #define PORTAB_BLINK_LED1 LINE_LED_GREEN +#define PORTAB_BLINK_LED2 LINE_LED_RED #define PORTAB_BLINK_BUTTON LINE_JOY_DOWN /*===========================================================================*/ diff --git a/testhal/STM32/multi/PAL/debug/STM32-PAL (OpenOCD, Flash and Run).launch b/testhal/STM32/multi/PAL/debug/STM32-PAL (OpenOCD, Flash and Run).launch deleted file mode 100644 index 3f081574f..000000000 --- a/testhal/STM32/multi/PAL/debug/STM32-PAL (OpenOCD, Flash and Run).launch +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testhal/STM32/multi/PAL/debug/STM32-PAL for STM32L476-Discovery (OpenOCD, Flash and Run).launch b/testhal/STM32/multi/PAL/debug/STM32-PAL for STM32L476-Discovery (OpenOCD, Flash and Run).launch new file mode 100644 index 000000000..de2cb25e8 --- /dev/null +++ b/testhal/STM32/multi/PAL/debug/STM32-PAL for STM32L476-Discovery (OpenOCD, Flash and Run).launch @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testhal/STM32/multi/PAL/main.c b/testhal/STM32/multi/PAL/main.c index 232fcf0b6..c57a75f02 100644 --- a/testhal/STM32/multi/PAL/main.c +++ b/testhal/STM32/multi/PAL/main.c @@ -22,6 +22,7 @@ /* Generic code. */ /*===========================================================================*/ +#if defined(PORTAB_BLINK_LED2) /* * LED blinker thread, times are in milliseconds. */ @@ -31,12 +32,13 @@ static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("blinker"); while (true) { - palClearLine(PORTAB_BLINK_LED1); + palClearLine(PORTAB_BLINK_LED2); chThdSleepMilliseconds(500); - palSetLine(PORTAB_BLINK_LED1); + palSetLine(PORTAB_BLINK_LED2); chThdSleepMilliseconds(500); } } +#endif /* * Application entry point. @@ -53,10 +55,12 @@ int main(void) { halInit(); chSysInit(); +#if defined(PORTAB_BLINK_LED2) /* * Creates the blinker thread. */ chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); +#endif /* * Normal main() thread activity. -- cgit v1.2.3