diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-06-04 17:22:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-04 17:22:57 -0700 |
| commit | 0c7c0821fc58af64c7f05e563f7334ceff2d8f55 (patch) | |
| tree | dcea463c2039ade1cdab3679202199f027afb84f /ports | |
| parent | 9a6a5ea2d989577edc74bf301390398ab2e133f9 (diff) | |
| parent | d0e6bb269fa425995a31083f02753203afccd253 (diff) | |
Merge pull request #891 from godlygeek/low_flash_errno_fixes
Human readable OSError messages for low flash devices
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/atmel-samd/mpconfigport.h | 12 | ||||
| -rw-r--r-- | ports/nrf/mpconfigport.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index ee75a26c5..276ffafe3 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -292,6 +292,18 @@ extern const struct _mp_obj_module_t usb_hid_module; { MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_ustack),(mp_obj_t)&ustack_module } +#define MICROPY_PY_UERRNO_LIST \ + X(EPERM) \ + X(ENOENT) \ + X(EIO) \ + X(EAGAIN) \ + X(ENOMEM) \ + X(EACCES) \ + X(EEXIST) \ + X(ENODEV) \ + X(EISDIR) \ + X(EINVAL) \ + // We need to provide a declaration/definition of alloca() #include <alloca.h> diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 442e98de5..e379469c0 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -82,7 +82,7 @@ #define MICROPY_STREAMS_NON_BLOCK (1) #define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_CAN_OVERRIDE_BUILTINS (1) -#define MICROPY_USE_INTERNAL_ERRNO (1) +#define MICROPY_USE_INTERNAL_ERRNO (0) #define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_BUILTINS_STR_UNICODE (1) #define MICROPY_PY_BUILTINS_STR_CENTER (0) |
