aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/multi
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-08-31 15:15:51 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-08-31 15:15:51 +0000
commit08cde3229436eac72ab86a31c0902922ad14fb67 (patch)
tree967ae58f634e5b675936301e8287e6d7def58115 /testhal/STM32/multi
parenta093ad6f13b6eb46075c179ade93bf07fb0d93a0 (diff)
downloadChibiOS-08cde3229436eac72ab86a31c0902922ad14fb67.tar.gz
ChibiOS-08cde3229436eac72ab86a31c0902922ad14fb67.tar.bz2
ChibiOS-08cde3229436eac72ab86a31c0902922ad14fb67.zip
Portability enhancements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10516 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/multi')
-rw-r--r--testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h3
-rw-r--r--testhal/STM32/multi/PAL/main.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h b/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h
index 69ebdd3d1..72538b587 100644
--- a/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h
+++ b/testhal/STM32/multi/PAL/cfg-stm32l476_discovery/portab.h
@@ -31,6 +31,9 @@
#define PORTAB_LINE_LED1 LINE_LED_GREEN
#define PORTAB_LINE_LED2 LINE_LED_RED
+#define PORTAB_LEN_OFF PAL_LOW
+#define PORTAB_LEN_ON PAL_HIGH
+
#define PORTAB_LINE_BUTTON LINE_JOY_CENTER
#define PORTAB_BUTTON_PRESSED PAL_HIGH
diff --git a/testhal/STM32/multi/PAL/main.c b/testhal/STM32/multi/PAL/main.c
index 5c1660c50..46a714dd2 100644
--- a/testhal/STM32/multi/PAL/main.c
+++ b/testhal/STM32/multi/PAL/main.c
@@ -96,10 +96,10 @@ int main(void) {
events = chEvtWaitOne(EVENT_MASK(0) | EVENT_MASK(1));
if (events & EVENT_MASK(0)) {
- palSetLine(PORTAB_LINE_LED1);
+ palWriteLine(PORTAB_LINE_LED1, PORTAB_LEN_ON);
}
if (events & EVENT_MASK(1)) {
- palClearLine(PORTAB_LINE_LED1);
+ palWriteLine(PORTAB_LINE_LED1, PORTAB_LEN_OFF);
}
}
}