summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/led.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-26 10:47:29 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-26 10:47:29 +0100
commit6d3c5e4301df363055dc256e6692c610e4d0b918 (patch)
treea07a18ed1a13d50990cf0e43a2a3c919cb14240d /stmhal/led.c
parentd139c489bab6b58906868e3fc8383ea813a122d4 (diff)
downloadmicropython-6d3c5e4301df363055dc256e6692c610e4d0b918.tar.gz
micropython-6d3c5e4301df363055dc256e6692c610e4d0b918.zip
Add ARRAY_SIZE macro, and use it where possible.
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 */