From 1718dbbff22f61738d2547e493c77b188d52d3d3 Mon Sep 17 00:00:00 2001 From: cepetr Date: Tue, 27 Aug 2024 18:01:59 +0200 Subject: [PATCH] feat(code/embed): introduce ARRAY_LENGTH macro [no changelog] --- core/embed/trezorhal/common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/embed/trezorhal/common.h b/core/embed/trezorhal/common.h index 6756030dd..3c92580c8 100644 --- a/core/embed/trezorhal/common.h +++ b/core/embed/trezorhal/common.h @@ -53,4 +53,6 @@ }) #endif +#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) + #endif