Skip to content

Commit e798b67

Browse files
committed
Begin a custom list of errnos for atmel-samd
The uerrno module was written to allow boards to customize the list of errnos they can raise. Start by copying the default list.
1 parent 1c35dbf commit e798b67

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,30 @@ extern const struct _mp_obj_module_t usb_hid_module;
290290
{ MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }, \
291291
{ MP_OBJ_NEW_QSTR(MP_QSTR_ustack),(mp_obj_t)&ustack_module }
292292

293+
#define MICROPY_PY_UERRNO_LIST \
294+
X(EPERM) \
295+
X(ENOENT) \
296+
X(EIO) \
297+
X(EBADF) \
298+
X(EAGAIN) \
299+
X(ENOMEM) \
300+
X(EACCES) \
301+
X(EEXIST) \
302+
X(ENODEV) \
303+
X(EISDIR) \
304+
X(EINVAL) \
305+
X(EOPNOTSUPP) \
306+
X(EADDRINUSE) \
307+
X(ECONNABORTED) \
308+
X(ECONNRESET) \
309+
X(ENOBUFS) \
310+
X(ENOTCONN) \
311+
X(ETIMEDOUT) \
312+
X(ECONNREFUSED) \
313+
X(EHOSTUNREACH) \
314+
X(EALREADY) \
315+
X(EINPROGRESS) \
316+
293317
// We need to provide a declaration/definition of alloca()
294318
#include <alloca.h>
295319

0 commit comments

Comments
 (0)