diff options
| author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-21 11:31:50 +0000 |
|---|---|---|
| committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-21 11:31:50 +0000 |
| commit | 9d359d8a3b3eb87a58764ac2c696bc10037c480f (patch) | |
| tree | 19b068845ee46b2453ee814d4af1cc557d61859e /demos/ARM7-AT91SAM7X-WEB-GCC/main.c | |
| parent | 05f9e5c72131d6997f3d424be4822e486b836645 (diff) | |
| download | ChibiOS-9d359d8a3b3eb87a58764ac2c696bc10037c480f.tar.gz ChibiOS-9d359d8a3b3eb87a58764ac2c696bc10037c480f.tar.bz2 ChibiOS-9d359d8a3b3eb87a58764ac2c696bc10037c480f.zip | |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1101 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 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c index 0eafb2260..e18d83d71 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c @@ -20,10 +20,10 @@ #include <ch.h>
#include <pal.h>
#include <test.h>
+#include <serial.h>
+#include <sam7x_emac.h>
#include "board.h"
-#include <sam7x_serial.h>
-#include <sam7x_emac.h>
#include "web/webthread.h"
@@ -48,6 +48,11 @@ static msg_t Thread1(void *arg) { int main(int argc, char **argv) {
/*
+ * Activates the communication port 1 using the driver default configuration.
+ */
+ sdStart(&COM1, NULL);
+
+ /*
* Creates the blinker and web server threads.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
@@ -59,7 +64,7 @@ int main(int argc, char **argv) { while (TRUE) {
chThdSleepMilliseconds(500);
if (!palReadPad(IOPORT_B, PIOB_SW1))
- chFDDWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14);
+ sdWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14);
if (!palReadPad(IOPORT_B, PIOB_SW2))
TestThread(&COM1);
}
|
