git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1101 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-08-21 11:31:50 +00:00
parent 05f9e5c721
commit 9d359d8a3b
3 changed files with 18 additions and 11 deletions

View File

@ -63,11 +63,12 @@ CSRC = ${PORTSRC} \
${TESTSRC} \
${USRC} \
../../os/io/pal.c \
../../os/ports/GCC/ARM7/AT91SAM7X/pal_lld.c \
../../os/ports/GCC/ARM7/AT91SAM7X/sam7x_serial.c \
../../os/ports/GCC/ARM7/AT91SAM7X/sam7x_emac.c \
../../os/io/serial.c \
../../os/io/platforms/AT91SAM7X/pal_lld.c \
../../os/io/platforms/AT91SAM7X/serial_lld.c \
../../os/io/platforms/AT91SAM7X/sam7x_emac.c \
../../os/io/platforms/AT91SAM7X/at91lib/aic.c \
../../os/various/evtimer.c \
at91lib/aic.c \
web/webthread.c \
board.c main.c
@ -101,8 +102,9 @@ ASMSRC = $(PORTASM) \
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
../../os/io \
../../os/ports/GCC/ARM7/AT91SAM7X \
../../os/io/platforms/AT91SAM7X \
../../os/various \
../../os/ports/GCC/ARM7/AT91SAM7X \
./web ../../ext/uip-1.0/uip ../../ext/uip-1.0/apps/webserver
#

View File

@ -19,12 +19,12 @@
#include <ch.h>
#include <pal.h>
#include <serial.h>
#include <sam7x_emac.h>
#include "board.h"
#include "at91lib/aic.h"
#include <sam7x_serial.h>
#include <sam7x_emac.h>
/*
* FIQ Handler weak symbol defined in vectors.s.
@ -170,7 +170,7 @@ void hwinit1(void) {
/*
* Serial driver initialization, RTS/CTS pins enabled for USART0 only.
*/
serial_init(AT91C_AIC_PRIOR_HIGHEST - 2, AT91C_AIC_PRIOR_HIGHEST - 2);
sdInit();
AT91C_BASE_PIOA->PIO_PDR = AT91C_PA3_RTS0 | AT91C_PA4_CTS0;
AT91C_BASE_PIOA->PIO_ASR = AT91C_PIO_PA3 | AT91C_PIO_PA4;
AT91C_BASE_PIOA->PIO_PPUDR = AT91C_PIO_PA3 | AT91C_PIO_PA4;

View File

@ -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"
@ -47,6 +47,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.
*/
@ -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);
}