summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2018-02-25 22:50:09 +0000
committerKarl Palsson <karlp@tweak.net.au>2018-02-25 22:50:09 +0000
commitd339255511a4491f560636b9515b51d504d79c11 (patch)
tree7944a723662398f3df6727ead0bd9af72128e1a9
parentda729ec6915c0094f111609d9f9b7e46162b8c13 (diff)
downloadolsndot-d339255511a4491f560636b9515b51d504d79c11.tar.gz
olsndot-d339255511a4491f560636b9515b51d504d79c11.tar.bz2
olsndot-d339255511a4491f560636b9515b51d504d79c11.zip
i2c-master: add parallel make and fix errors
Fix bugs from outof date libopencm3
-rw-r--r--tests/i2c-master/Makefile15
-rw-r--r--tests/i2c-master/main-stm32f072-disco.c2
2 files changed, 16 insertions, 1 deletions
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);