aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Palsson2012-10-22 21:29:42 +0000
committerKarl Palsson2012-11-07 21:50:27 +0000
commit25acaa58783b4d046acbe961cb62efe0b39ec981 (patch)
treedaedb9b86acd04f864c960d703483b37bd51ed94 /lib
parent2e5cfa39a522ac07518909a06276556ef864fb4c (diff)
Add usart support for L1.
Only tested with basic tx blocking, ie, the same example code as on F2/F4, but the description of the block is almost identical.
Diffstat (limited to 'lib')
-rw-r--r--lib/stm32/l1/Makefile2
-rw-r--r--lib/stm32/usart.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/stm32/l1/Makefile b/lib/stm32/l1/Makefile
index a009857..f852239 100644
--- a/lib/stm32/l1/Makefile
+++ b/lib/stm32/l1/Makefile
@@ -28,7 +28,7 @@ CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \
-ffunction-sections -fdata-sections -MD -DSTM32F1
# ARFLAGS = rcsv
ARFLAGS = rcs
-OBJS = rcc.o gpio.o desig.o crc.o
+OBJS = rcc.o gpio.o desig.o crc.o usart.o
VPATH += ../../usb:../:../../cm3
diff --git a/lib/stm32/usart.c b/lib/stm32/usart.c
index 5cf861b..1faf486 100644
--- a/lib/stm32/usart.c
+++ b/lib/stm32/usart.c
@@ -46,6 +46,8 @@ LGPL License Terms @ref lgpl_license
# include <libopencm3/stm32/f2/rcc.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/rcc.h>
+#elif defined(STM32L1)
+# include <libopencm3/stm32/l1/rcc.h>
#else
# error "stm32 family not defined."
#endif