From a165bdf583a3d20874708a3710210f099ef54d4e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Mar 2022 12:07:54 -0600 Subject: [PATCH] Make countio object long-lived --- shared-bindings/countio/Counter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c index 8582f4497e..e495ecd1d5 100644 --- a/shared-bindings/countio/Counter.c +++ b/shared-bindings/countio/Counter.c @@ -53,7 +53,7 @@ STATIC mp_obj_t countio_counter_make_new(const mp_obj_type_t *type, size_t n_arg const countio_edge_t edge = validate_edge(args[ARG_edge].u_obj, MP_QSTR_edge); const digitalio_pull_t pull = validate_pull(args[ARG_pull].u_obj, MP_QSTR_pull); - countio_counter_obj_t *self = m_new_obj(countio_counter_obj_t); + countio_counter_obj_t *self = m_new_ll_obj(countio_counter_obj_t); self->base.type = &countio_counter_type; common_hal_countio_counter_construct(self, pin, edge, pull);