aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-AT91SAM7X-GCC
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-13 07:06:38 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-13 07:06:38 +0000
commitc731a9477bd4fbbadb4ac7c19726c4d5f812f461 (patch)
treea9afc42c6259b4bb3811dcd426f5e8a047665126 /demos/ARM7-AT91SAM7X-GCC
parent0d70a22f82a9e1ab1802524e2c821761a9ea569d (diff)
downloadChibiOS-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-GCC')
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/board.c3
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/main.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/board.c b/demos/ARM7-AT91SAM7X-GCC/board.c
index 2b53c87b7..02ac5046d 100644
--- a/demos/ARM7-AT91SAM7X-GCC/board.c
+++ b/demos/ARM7-AT91SAM7X-GCC/board.c
@@ -101,9 +101,6 @@ void hwinit0(void) {
* PIO initialization.
*/
palInit();
-/* AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_PIOB);
- AT91C_BASE_PIOA->PIO_PER = 0xFFFFFFFF;
- AT91C_BASE_PIOB->PIO_PER = 0xFFFFFFFF;*/
}
/*
diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c
index c51c911c9..614b649cd 100644
--- a/demos/ARM7-AT91SAM7X-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-GCC/main.c
@@ -18,6 +18,7 @@
*/
#include <ch.h>
+#include <pal.h>
#include <test.h>
#include "board.h"
@@ -27,9 +28,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;
@@ -51,9 +52,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);
}