aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM3-STM32F103-GCC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARMCM3-STM32F103-GCC')
-rw-r--r--demos/ARMCM3-STM32F103-GCC/Makefile3
-rw-r--r--demos/ARMCM3-STM32F103-GCC/board.c8
-rw-r--r--demos/ARMCM3-STM32F103-GCC/chconf.h10
-rw-r--r--demos/ARMCM3-STM32F103-GCC/main.c7
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);