aboutsummaryrefslogtreecommitdiff
path: root/stmhal/mphalport.c
diff options
context:
space:
mode:
authorDamien George2016-05-10 23:22:54 +0100
committerDamien George2016-05-10 23:30:39 +0100
commit5ab98d5c41bffa799a551a2731d904cab346898e (patch)
tree3e69611c73314b7e7c374172a9118e76e4b43dce /stmhal/mphalport.c
parent088127d91cb593990cf4f04e64ca452671041e6f (diff)
stmhal: Convert to use internal errno symbols; enable uerrno module.
Diffstat (limited to 'stmhal/mphalport.c')
-rw-r--r--stmhal/mphalport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/mphalport.c b/stmhal/mphalport.c
index 7a86989ff..cea036921 100644
--- a/stmhal/mphalport.c
+++ b/stmhal/mphalport.c
@@ -1,7 +1,7 @@
-#include <errno.h>
#include <string.h>
#include "py/mpstate.h"
+#include "py/mperrno.h"
#include "py/mphal.h"
#include "usb.h"
#include "uart.h"
@@ -9,9 +9,9 @@
// this table converts from HAL_StatusTypeDef to POSIX errno
const byte mp_hal_status_to_errno_table[4] = {
[HAL_OK] = 0,
- [HAL_ERROR] = EIO,
- [HAL_BUSY] = EBUSY,
- [HAL_TIMEOUT] = ETIMEDOUT,
+ [HAL_ERROR] = MP_EIO,
+ [HAL_BUSY] = MP_EBUSY,
+ [HAL_TIMEOUT] = MP_ETIMEDOUT,
};
NORETURN void mp_hal_raise(HAL_StatusTypeDef status) {