summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/led.c')
-rw-r--r--stmhal/led.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/led.c b/stmhal/led.c
index d30c72157e..5a0dd7b9ac 100644
--- a/stmhal/led.c
+++ b/stmhal/led.c
@@ -30,7 +30,7 @@ STATIC const pyb_led_obj_t pyb_led_obj[] = {
#endif
#endif
};
-#define NUM_LEDS (sizeof(pyb_led_obj) / sizeof(pyb_led_obj[0]))
+#define NUM_LEDS ARRAY_SIZE(pyb_led_obj)
void led_init(void) {
/* GPIO structure */