kinetis/spi_scalar: Add local ARRAY_SIZE define

The spi scalar calculation tool for the kinetis family is stand-alone
and doesn't use the RIOT headers. It doesn't include the ARRAY_SIZE
macro from the RIOT headers. This commit adds a local definition of the
ARRAY_SIZE macro
This commit is contained in:
Koen Zandberg 2020-06-21 17:09:32 +02:00
parent 09d097c934
commit c2a7d23277
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -28,6 +28,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
/** /**
* @brief Targeted SPI bus speed values (pre-defined by RIOT) * @brief Targeted SPI bus speed values (pre-defined by RIOT)
*/ */