In the C function I'm doing this to get the pointer to the structure:
Code: Select all
size_t len;
stepper *s = (stepper *)mp_obj_str_get_data(mp_load_attr(self, MP_QSTR__s), &len);
Code: Select all
uncaught exception in Timer(8) interrupt handler
TypeError: can't convert 'struct' object to str implicitly