aboutsummaryrefslogtreecommitdiffstats
path: root/demos/AVR-ATmega128-GCC/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-10-09 16:32:08 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-10-09 16:32:08 +0000
commit977abf0c51adfac84351ac5c9d93edf4719fd094 (patch)
tree1a2ffbff7b043bf5222286d95c5f57e786e9220d /demos/AVR-ATmega128-GCC/main.c
parenteea23b22826e76dba443a12c651d5490a0314471 (diff)
downloadChibiOS-977abf0c51adfac84351ac5c9d93edf4719fd094.tar.gz
ChibiOS-977abf0c51adfac84351ac5c9d93edf4719fd094.tar.bz2
ChibiOS-977abf0c51adfac84351ac5c9d93edf4719fd094.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3440 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/AVR-ATmega128-GCC/main.c')
-rw-r--r--demos/AVR-ATmega128-GCC/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/demos/AVR-ATmega128-GCC/main.c b/demos/AVR-ATmega128-GCC/main.c
index 0b26a9641..cd982d1b9 100644
--- a/demos/AVR-ATmega128-GCC/main.c
+++ b/demos/AVR-ATmega128-GCC/main.c
@@ -28,8 +28,8 @@ static WORKING_AREA(waThread1, 32);
static msg_t Thread1(void *arg) {
while (TRUE) {
- if (!(PINA & PORTA_BUTTON2))
- PORTA ^= PORTA_RELAY;
+ if (!palReadPad(IOPORT1, PORTA_BUTTON2))
+ palTogglePad(IOPORT1, PORTA_RELAY);
chThdSleepMilliseconds(1000);
}
return 0;
@@ -38,7 +38,7 @@ static msg_t Thread1(void *arg) {
static void TimerHandler(eventid_t id) {
msg_t TestThread(void *p);
- if (!(PINA & PORTA_BUTTON1))
+ if (!palReadPad(IOPORT1, PORTA_BUTTON1))
TestThread(&SD2);
}