diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-19 13:11:25 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-08-19 13:11:25 +0000 |
commit | 45a6b7dc5a1758cb2bc49b0d76effa381043d297 (patch) | |
tree | 2e9f38ca4e3eed5f7d1c3b0c1271564c4f5655f0 /demos | |
parent | 0a59caa507fd9aed69345ba2c915dfa8f7c2395c (diff) | |
download | ChibiOS-45a6b7dc5a1758cb2bc49b0d76effa381043d297.tar.gz ChibiOS-45a6b7dc5a1758cb2bc49b0d76effa381043d297.tar.bz2 ChibiOS-45a6b7dc5a1758cb2bc49b0d76effa381043d297.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1082 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/Makefile | 3 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/board.c | 8 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/chconf.h | 10 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/main.c | 7 |
4 files changed, 12 insertions, 16 deletions
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 <nvic.h>
#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 @@ -233,16 +233,6 @@ #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.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
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 <test.h>
#include "board.h"
-#include "stm32_serial.h"
+#include "serial.h"
/*
* Red LEDs blinker thread, times are in milliseconds.
@@ -46,6 +46,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.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|