Skip to content

Commit 704d0c6

Browse files
committed
samd51: Support more uerrno errno values
Use the default MICROPY_PY_UERRNO_LIST to give libraries access to all the errno values.
1 parent c5aa2e9 commit 704d0c6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ typedef long mp_off_t;
163163
#define MICROPY_PY_IO (0)
164164
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
165165
#define MICROPY_PY_SYS_EXC_INFO (0)
166+
#define MICROPY_PY_UERRNO_LIST \
167+
X(EPERM) \
168+
X(ENOENT) \
169+
X(EIO) \
170+
X(EAGAIN) \
171+
X(ENOMEM) \
172+
X(EACCES) \
173+
X(EEXIST) \
174+
X(ENODEV) \
175+
X(EISDIR) \
176+
X(EINVAL) \
177+
166178
#endif
167179

168180
#ifdef SAMD51
@@ -179,6 +191,7 @@ typedef long mp_off_t;
179191
#define MICROPY_PY_IO (1)
180192
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
181193
#define MICROPY_PY_SYS_EXC_INFO (1)
194+
// MICROPY_PY_UERRNO_LIST - Use the default
182195
#endif
183196

184197
#ifdef LONGINT_IMPL_NONE
@@ -396,18 +409,6 @@ extern const struct _mp_obj_module_t wiznet_module;
396409
{ MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }, \
397410
{ MP_OBJ_NEW_QSTR(MP_QSTR_ustack),(mp_obj_t)&ustack_module }
398411

399-
#define MICROPY_PY_UERRNO_LIST \
400-
X(EPERM) \
401-
X(ENOENT) \
402-
X(EIO) \
403-
X(EAGAIN) \
404-
X(ENOMEM) \
405-
X(EACCES) \
406-
X(EEXIST) \
407-
X(ENODEV) \
408-
X(EISDIR) \
409-
X(EINVAL) \
410-
411412
// We need to provide a declaration/definition of alloca()
412413
#include <alloca.h>
413414

0 commit comments

Comments
 (0)