aboutsummaryrefslogtreecommitdiff
path: root/extmod/moductypes.c
diff options
context:
space:
mode:
authorDamien George2014-09-29 12:18:48 +0100
committerDamien George2014-09-29 12:18:48 +0100
commitbf683e6b323b3ebab3be2fd65c24c8a65698124d (patch)
treed0a3eadd0fc0296fa9a9dcd551629794fe88b11c /extmod/moductypes.c
parentf90b59e61035c194470b7de589cfc3b44484b1fe (diff)
parent39296b40d49b4b6b9373a80de67e017e540f1408 (diff)
Merge pull request #877 from dhylands/timer-overflow
Fix timer overflow code.
Diffstat (limited to 'extmod/moductypes.c')
-rw-r--r--extmod/moductypes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 73a8db7cc..3e35ed682 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -309,10 +309,12 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
case UINT64:
case INT64:
return mp_obj_new_int_from_ll(((int64_t*)p)[index]);
+ #if MICROPY_PY_BUILTINS_FLOAT
case FLOAT32:
return mp_obj_new_float(((float*)p)[index]);
case FLOAT64:
return mp_obj_new_float(((double*)p)[index]);
+ #endif
default:
assert(0);
return MP_OBJ_NULL;