Skip to content

Commit 105e32f

Browse files
committed
stmhal: Enable moductypes by default.
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue adafruit#778.
1 parent f20375e commit 105e32f

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

extmod/moductypes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
315315
return mp_obj_new_float(((double*)p)[index]);
316316
default:
317317
assert(0);
318+
return MP_OBJ_NULL;
318319
}
319320
}
320321

@@ -513,6 +514,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_ob
513514
}
514515

515516
assert(0);
517+
return MP_OBJ_NULL;
516518
} else {
517519
// store
518520
return MP_OBJ_NULL; // op not supported

stmhal/mpconfigport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#define MICROPY_PY_CMATH (1)
5252
#define MICROPY_PY_IO (1)
5353
#define MICROPY_PY_IO_FILEIO (1)
54+
#define MICROPY_PY_UCTYPES (1)
5455

5556
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
5657
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)

0 commit comments

Comments
 (0)