aboutsummaryrefslogtreecommitdiff
path: root/stmhal/dac.c
diff options
context:
space:
mode:
authorDamien George2014-04-26 10:47:29 +0100
committerDamien George2014-04-26 10:47:29 +0100
commit6d3c5e4301df363055dc256e6692c610e4d0b918 (patch)
treea07a18ed1a13d50990cf0e43a2a3c919cb14240d /stmhal/dac.c
parentd139c489bab6b58906868e3fc8383ea813a122d4 (diff)
Add ARRAY_SIZE macro, and use it where possible.
Diffstat (limited to 'stmhal/dac.c')
-rw-r--r--stmhal/dac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/dac.c b/stmhal/dac.c
index 92edb24d7..b9f825c05 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -167,7 +167,7 @@ STATIC const mp_arg_parse_t pyb_dac_write_timed_accepted_args[] = {
{ MP_QSTR_freq, MP_ARG_PARSE_REQUIRED | MP_ARG_PARSE_INT, {.u_int = 0} },
{ MP_QSTR_mode, MP_ARG_PARSE_KW_ONLY | MP_ARG_PARSE_INT, {.u_int = DMA_NORMAL} },
};
-#define PYB_DAC_WRITE_TIMED_NUM_ARGS (sizeof(pyb_dac_write_timed_accepted_args) / sizeof(pyb_dac_write_timed_accepted_args[0]))
+#define PYB_DAC_WRITE_TIMED_NUM_ARGS ARRAY_SIZE(pyb_dac_write_timed_accepted_args)
mp_obj_t pyb_dac_write_timed(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) {
pyb_dac_obj_t *self = args[0];