From: asterix Date: Sat, 20 Oct 2007 14:11:02 +0000 (+0000) Subject: Add serial test. X-Git-Tag: 1.0.0~321 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d385a4a5950320ad1a4e41457e874cb10d6e040e;p=bertos.git Add serial test. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@921 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/at91sam7s/at91sam7s.c b/app/at91sam7s/at91sam7s.c index 3756d918..000d3322 100644 --- a/app/at91sam7s/at91sam7s.c +++ b/app/at91sam7s/at91sam7s.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -75,6 +76,13 @@ int main(void) kdbg_init(); sysirq_init(); timer_init(); + + + /* Open the main communication port */ + Serial *host_port = ser_open(0); + ser_setbaudrate(host_port, 115200); + ser_setparity(host_port, SER_PARITY_NONE); + IRQ_ENABLE; /* Disable all pullups */ @@ -91,14 +99,19 @@ int main(void) /* turn first led on */ PIOA_CODR = 0x00000001; + + + +/* timer_set_event_softint(&leds_timer, (Hook)leds_toggle, 0); timer_setDelay(&leds_timer, ms_to_ticks(100)); timer_add(&leds_timer); - +*/ // Main loop for(;;) { + ser_printf(host_port," %s", "a"); kprintf("W la figa!\n"); iort+= 1; iort1+= 1;