From: Martin Mares Date: Tue, 30 Jul 2019 20:34:19 +0000 (+0200) Subject: Protab: Blink with systick X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=da2464a8d3a6c88593601abcf49d9b6c740126fe;p=home-hw.git Protab: Blink with systick --- diff --git a/protab/blink2/Makefile b/protab/blink2/Makefile new file mode 100644 index 0000000..17a67e8 --- /dev/null +++ b/protab/blink2/Makefile @@ -0,0 +1,6 @@ +ROOT=../.. +BINARY=blink +OBJS=blink.o +LIB_OBJS= + +include $(ROOT)/mk/bluepill.mk diff --git a/protab/blink2/blink.c b/protab/blink2/blink.c new file mode 100644 index 0000000..605e113 --- /dev/null +++ b/protab/blink2/blink.c @@ -0,0 +1,33 @@ +#include +#include +#include + +static void delay_ms(unsigned int ms) +{ + systick_clear(); + for (unsigned int i=0; i