diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-06-13 07:06:38 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-06-13 07:06:38 +0000 |
commit | c731a9477bd4fbbadb4ac7c19726c4d5f812f461 (patch) | |
tree | a9afc42c6259b4bb3811dcd426f5e8a047665126 /demos/ARM7-AT91SAM7X-WEB-GCC/main.c | |
parent | 0d70a22f82a9e1ab1802524e2c821761a9ea569d (diff) | |
download | ChibiOS-c731a9477bd4fbbadb4ac7c19726c4d5f812f461.tar.gz ChibiOS-c731a9477bd4fbbadb4ac7c19726c4d5f812f461.tar.bz2 ChibiOS-c731a9477bd4fbbadb4ac7c19726c4d5f812f461.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1029 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-AT91SAM7X-WEB-GCC/main.c')
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c index 07af9b0bd..0eafb2260 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c @@ -18,6 +18,7 @@ */
#include <ch.h>
+#include <pal.h>
#include <test.h>
#include "board.h"
@@ -32,9 +33,9 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) {
while (TRUE) {
- AT91C_BASE_PIOB->PIO_SODR = PIOB_LCD_BL; // LCD on.
+ palSetPad(IOPORT_B, PIOB_LCD_BL);
chThdSleepMilliseconds(100);
- AT91C_BASE_PIOB->PIO_CODR = PIOB_LCD_BL; // LCD off.
+ palClearPad(IOPORT_B, PIOB_LCD_BL);
chThdSleepMilliseconds(900);
}
return 0;
@@ -57,9 +58,9 @@ int main(int argc, char **argv) { */
while (TRUE) {
chThdSleepMilliseconds(500);
- if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW1))
+ if (!palReadPad(IOPORT_B, PIOB_SW1))
chFDDWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14);
- if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW2))
+ if (!palReadPad(IOPORT_B, PIOB_SW2))
TestThread(&COM1);
}
|