aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM3-STM32F103-GCC/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-07 10:27:48 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-07 10:27:48 +0000
commit4fc5b696fad6b10620dcd49149bf64b829e38f77 (patch)
tree4e2509a8201057aa54fc2cb22eac8188c738c4e5 /demos/ARMCM3-STM32F103-GCC/main.c
parent9659a679baf31f9890d941c4e25617a7ca70756f (diff)
downloadChibiOS-4fc5b696fad6b10620dcd49149bf64b829e38f77.tar.gz
ChibiOS-4fc5b696fad6b10620dcd49149bf64b829e38f77.tar.bz2
ChibiOS-4fc5b696fad6b10620dcd49149bf64b829e38f77.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1019 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARMCM3-STM32F103-GCC/main.c')
-rw-r--r--demos/ARMCM3-STM32F103-GCC/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c
index 81a9af702..f89131d37 100644
--- a/demos/ARMCM3-STM32F103-GCC/main.c
+++ b/demos/ARMCM3-STM32F103-GCC/main.c
@@ -18,6 +18,7 @@
*/
#include <ch.h>
+#include <pal.h>
#include <test.h>
#include "board.h"
@@ -30,9 +31,9 @@ static WORKING_AREA(waThread1, 128);
static msg_t Thread1(void *arg) {
while (TRUE) {
- chPortClear(IOPORT_C, GPIOC_LED);
+ palClearPad(IOPORT_C, GPIOC_LED);
chThdSleepMilliseconds(500);
- chPortSet(IOPORT_C, GPIOC_LED);
+ palSetPad(IOPORT_C, GPIOC_LED);
chThdSleepMilliseconds(500);
}
return 0;
@@ -54,7 +55,7 @@ int main(int argc, char **argv) {
* sleeping in a loop and check the button state.
*/
while (TRUE) {
- if (chPortRead(IOPORT_A) & GPIOA_BUTTON)
+ if (palReadPad(IOPORT_A, GPIOA_BUTTON))
TestThread(&COM2);
chThdSleepMilliseconds(500);
}