From 0b8f1183fe1f321fdd71e9d1fc5a28323f9036a7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 20 Aug 2009 12:53:46 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1090 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-GCC/Makefile | 11 ++++++----- demos/ARM7-LPC214x-GCC/board.c | 5 ++--- demos/ARM7-LPC214x-GCC/main.c | 9 +++++++-- demos/ARMCM3-STM32F103-GCC/Makefile | 6 +++--- 4 files changed, 18 insertions(+), 13 deletions(-) (limited to 'demos') diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 0b36edb4a..b34dd3b64 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -53,10 +53,11 @@ CSRC = ${PORTSRC} \ ${KERNSRC} \ ${TESTSRC} \ ../../os/io/pal.c \ - ../../os/ports/GCC//ARM7/LPC214x/vic.c \ - ../../os/ports/GCC/ARM7/LPC214x/pal_lld.c \ - ../../os/ports/GCC/ARM7/LPC214x/lpc214x_serial.c \ - ../../os/ports/GCC/ARM7/LPC214x/lpc214x_ssp.c \ + ../../os/io/serial.c \ + ../../os/io/platforms/LPC214x/pal_lld.c \ + ../../os/io/platforms/LPC214x/serial_lld.c \ + ../../os/io/platforms/LPC214x/vic.c \ + ../../os/io/platforms/LPC214x/lpc214x_ssp.c \ ../../os/various/evtimer.c \ board.c buzzer.c mmcsd.c main.c @@ -90,7 +91,7 @@ ASMSRC = $(PORTASM) \ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ ../../os/io \ - ../../os/ports/GCC/ARM7/LPC214x \ + ../../os/io/platforms/LPC214x \ ../../os/various # diff --git a/demos/ARM7-LPC214x-GCC/board.c b/demos/ARM7-LPC214x-GCC/board.c index 8be258a1a..2c041b384 100644 --- a/demos/ARM7-LPC214x-GCC/board.c +++ b/demos/ARM7-LPC214x-GCC/board.c @@ -19,10 +19,9 @@ #include #include +#include -#include "lpc214x.h" #include "vic.h" -#include "lpc214x_serial.h" #include "lpc214x_ssp.h" #include "board.h" @@ -144,7 +143,7 @@ void hwinit1(void) { /* * Other subsystems. */ - serial_init(1, 2); + sdInit(); ssp_init(); InitMMC(); InitBuzzer(); diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c index 61ad4ea77..33197c2cb 100644 --- a/demos/ARM7-LPC214x-GCC/main.c +++ b/demos/ARM7-LPC214x-GCC/main.c @@ -19,10 +19,10 @@ #include #include +#include #include #include "board.h" -#include "lpc214x_serial.h" #include "mmcsd.h" #include "buzzer.h" #include "evtimer.h" @@ -80,7 +80,7 @@ static void TimerHandler(eventid_t id) { if (!palReadPad(IOPORT_A, PA_BUTTON1)) PlaySound(1000, MS2ST(100)); if (!palReadPad(IOPORT_A, PA_BUTTON2)) { - chFDDWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14); + sdWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14); PlaySound(2000, MS2ST(100)); } } @@ -128,6 +128,11 @@ int main(int argc, char **argv) { static EvTimer evt; struct EventListener el0, el1, el2; + /* + * Activates the communication port 1 using the driver default configuration. + */ + sdStart(&COM1, NULL); + /* * If a button is pressed during the reset then the blinking leds threads * are not started in order to make accurate benchmarks. diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile index d44b016bb..a337a1a5b 100644 --- a/demos/ARMCM3-STM32F103-GCC/Makefile +++ b/demos/ARMCM3-STM32F103-GCC/Makefile @@ -67,8 +67,8 @@ CSRC = ${PORTSRC} \ ${TESTSRC} \ ../../os/io/pal.c \ ../../os/io/serial.c \ - ../../os/ports/GCC/ARMCM3/STM32F103/pal_lld.c \ - ../../os/ports/GCC/ARMCM3/STM32F103/serial_lld.c \ + ../../os/io/platforms/STM32F103/pal_lld.c \ + ../../os/io/platforms/STM32F103/serial_lld.c \ ../../os/various/evtimer.c \ board.c main.c @@ -102,7 +102,7 @@ ASMSRC = $(PORTASM) \ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ ../../os/io \ - ../../os/ports/GCC/ARMCM3/STM32F103 \ + ../../os/io/platforms/STM32F103 \ ../../os/various \ ./stm32lib/inc -- cgit v1.2.3