From 45a6b7dc5a1758cb2bc49b0d76effa381043d297 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 19 Aug 2009 13:11:25 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1082 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F103-GCC/Makefile | 3 ++- demos/ARMCM3-STM32F103-GCC/board.c | 8 ++++---- demos/ARMCM3-STM32F103-GCC/chconf.h | 10 ---------- demos/ARMCM3-STM32F103-GCC/main.c | 7 ++++++- 4 files changed, 12 insertions(+), 16 deletions(-) (limited to 'demos') diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile index 59e1fc544..d44b016bb 100644 --- a/demos/ARMCM3-STM32F103-GCC/Makefile +++ b/demos/ARMCM3-STM32F103-GCC/Makefile @@ -66,8 +66,9 @@ CSRC = ${PORTSRC} \ ${KERNSRC} \ ${TESTSRC} \ ../../os/io/pal.c \ + ../../os/io/serial.c \ ../../os/ports/GCC/ARMCM3/STM32F103/pal_lld.c \ - ../../os/ports/GCC/ARMCM3/STM32F103/stm32_serial.c \ + ../../os/ports/GCC/ARMCM3/STM32F103/serial_lld.c \ ../../os/various/evtimer.c \ board.c main.c diff --git a/demos/ARMCM3-STM32F103-GCC/board.c b/demos/ARMCM3-STM32F103-GCC/board.c index 01831c7fd..11a47e828 100644 --- a/demos/ARMCM3-STM32F103-GCC/board.c +++ b/demos/ARMCM3-STM32F103-GCC/board.c @@ -22,14 +22,14 @@ #include #include "board.h" -#include "stm32_serial.h" +#include "serial.h" #define AIRCR_VECTKEY 0x05FA0000 /* * Digital I/O ports static configuration as defined in @p board.h. */ -static const STM32GPIOConfig config = +static const STM32GPIOConfig pal_config = { {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, @@ -83,7 +83,7 @@ void hwinit0(void) { /* * I/O ports initialization as specified in board.h. */ - palInit(&config); + palInit(&pal_config); } /* @@ -112,7 +112,7 @@ void hwinit1(void) { /* * Other subsystems initialization. */ - serial_init(0xC0, 0xC0, 0xC0); + sd_lld_init(); /* * ChibiOS/RT initialization. diff --git a/demos/ARMCM3-STM32F103-GCC/chconf.h b/demos/ARMCM3-STM32F103-GCC/chconf.h index 8e6eda189..3c6353168 100644 --- a/demos/ARMCM3-STM32F103-GCC/chconf.h +++ b/demos/ARMCM3-STM32F103-GCC/chconf.h @@ -232,16 +232,6 @@ #define CH_USE_QUEUES TRUE #endif -/** - * If specified then the full duplex serial driver APIs are included in the - * kernel. - * @note The default is @p TRUE. - * @note Requires @p CH_USE_QUEUES. - */ -#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__) -#define CH_USE_SERIAL_FULLDUPLEX TRUE -#endif - /** * If specified then the memory heap allocator APIs are included in the kernel. * @note The default is @p TRUE. diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c index f89131d37..d1f78f7e8 100644 --- a/demos/ARMCM3-STM32F103-GCC/main.c +++ b/demos/ARMCM3-STM32F103-GCC/main.c @@ -22,7 +22,7 @@ #include #include "board.h" -#include "stm32_serial.h" +#include "serial.h" /* * Red LEDs blinker thread, times are in milliseconds. @@ -45,6 +45,11 @@ static msg_t Thread1(void *arg) { */ int main(int argc, char **argv) { + /* + * Activates the communication port 2 using the driver default configuration. + */ + sdStart(&COM2, NULL); + /* * Creates the blinker thread. */ -- cgit v1.2.3