From c2a7d2327708767097fad7084ffaa9b889b27327 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Sun, 21 Jun 2020 17:09:32 +0200 Subject: [PATCH] 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 --- cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c b/cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c index a2f1fdad81..029a5de237 100644 --- a/cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c +++ b/cpu/kinetis/dist/calc_spi_scalers/calc_spi_scalers.c @@ -28,6 +28,8 @@ #include #include +#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) + /** * @brief Targeted SPI bus speed values (pre-defined by RIOT) */