From d339255511a4491f560636b9515b51d504d79c11 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Sun, 25 Feb 2018 22:50:09 +0000 Subject: i2c-master: add parallel make and fix errors Fix bugs from outof date libopencm3 --- tests/i2c-master/Makefile | 15 +++++++++++++++ tests/i2c-master/main-stm32f072-disco.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/i2c-master/Makefile diff --git a/tests/i2c-master/Makefile b/tests/i2c-master/Makefile new file mode 100644 index 0000000..52841cd --- /dev/null +++ b/tests/i2c-master/Makefile @@ -0,0 +1,15 @@ +# This is just a stub makefile used for travis builds +# to keep things all compiling. Normally you'd use +# one of the makefiles directly. + +# These hoops are to enable parallel make correctly. +GZ_ALL := $(wildcard Makefile.*) + +all: $(GZ_ALL:=.all) +clean: $(GZ_ALL:=.clean) + +%.all: + make -f $* all +%.clean: + make -f $* clean + diff --git a/tests/i2c-master/main-stm32f072-disco.c b/tests/i2c-master/main-stm32f072-disco.c index 26b071a..41a4902 100644 --- a/tests/i2c-master/main-stm32f072-disco.c +++ b/tests/i2c-master/main-stm32f072-disco.c @@ -44,7 +44,7 @@ void setup_usart(void) usart_set_baudrate(dev, 115200); usart_set_databits(dev, 8); usart_set_parity(dev, USART_PARITY_NONE); - usart_set_stopbits(dev, USART_CR2_STOP_1_0BIT); + usart_set_stopbits(dev, USART_CR2_STOPBITS_1); usart_set_mode(dev, USART_MODE_TX); usart_set_flow_control(dev, USART_FLOWCONTROL_NONE); -- cgit