diff --git a/openrtx/include/core/utils.h b/openrtx/include/core/utils.h index 08dee873..e2cd6af2 100644 --- a/openrtx/include/core/utils.h +++ b/openrtx/include/core/utils.h @@ -28,6 +28,14 @@ extern "C" { #endif +/** + * Get the number of elements of an array. + * + * @param x: array. + * @return number of elements. + */ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + /** * This function allows to obtain the value of a given calibration parameter for * frequencies outside the calibration points. It works by searching the two