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]))