1 parent 09dd229 commit 44a5ca2Copy full SHA for 44a5ca2
1 file changed
shared-bindings/pulseio/PulseIn.c
@@ -87,6 +87,7 @@ STATIC mp_obj_t pulseio_pulsein_make_new(const mp_obj_type_t *type, size_t n_arg
87
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
88
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj);
89
90
+ // Make object long-lived to avoid moving between imports
91
pulseio_pulsein_obj_t *self = m_new_ll_obj(pulseio_pulsein_obj_t);
92
self->base.type = &pulseio_pulsein_type;
93
0 commit comments