summaryrefslogtreecommitdiff
path: root/stmhal/mphal.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/mphal.c')
-rw-r--r--stmhal/mphal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/mphal.c b/stmhal/mphal.c
index e8f242051..7fcd982dc 100644
--- a/stmhal/mphal.c
+++ b/stmhal/mphal.c
@@ -16,5 +16,5 @@ const byte mp_hal_status_to_errno_table[4] = {
};
NORETURN void mp_hal_raise(HAL_StatusTypeDef status) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, (mp_obj_t)(mp_uint_t)mp_hal_status_to_errno_table[status]));
+ nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(mp_hal_status_to_errno_table[status])));
}