From 729e73e70536a0410baa31f30d7422c254009d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 21 Jul 2021 23:39:08 +0200 Subject: [PATCH] main: use header file --- main.c | 8 +++++--- main.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 main.h diff --git a/main.c b/main.c index 442a1e5..13d8e81 100644 --- a/main.c +++ b/main.c @@ -4,10 +4,12 @@ */ #include #include -#include "stm8s.h" +#include + +#include "stm8s.h" +#include "main.h" + -// get length of array -#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) // blocking wait (in 10 us steps, up to UINT32_MAX / 10) static void wait_10us(uint32_t us10) diff --git a/main.h b/main.h new file mode 100644 index 0000000..f3ea966 --- /dev/null +++ b/main.h @@ -0,0 +1,2 @@ +// get length of array +#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))