diff options
author | Damien George <damien.p.george@gmail.com> | 2016-05-10 23:25:39 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-05-10 23:30:39 +0100 |
commit | 4f2ba9fbdcbafd7ae09199186320f4173bcc8c31 (patch) | |
tree | 2146c48c85567dbe715630d2dffe95fa75c50cb0 /esp8266/modpybuart.c | |
parent | 5ab98d5c41bffa799a551a2731d904cab346898e (diff) |
esp8266: Convert to use new MP_Exxx errno symbols.
These symbols are still defined in terms of the system Exxx symbols, and
can be switched to internal numeric definitions at a later stage.
Note that extmod/modlwip still uses many system Exxx symbols.
Diffstat (limited to 'esp8266/modpybuart.c')
-rw-r--r-- | esp8266/modpybuart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/esp8266/modpybuart.c b/esp8266/modpybuart.c index eefb38d99..5971ffece 100644 --- a/esp8266/modpybuart.c +++ b/esp8266/modpybuart.c @@ -27,13 +27,13 @@ #include <stdio.h> #include <stdint.h> #include <string.h> -#include <errno.h> #include "ets_sys.h" #include "uart.h" #include "py/runtime.h" #include "py/stream.h" +#include "py/mperrno.h" #include "modpyb.h" // baudrate is currently fixed to this value @@ -136,7 +136,7 @@ STATIC mp_uint_t pyb_uart_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, i // wait for first char to become available if (!uart_rx_wait(self->timeout * 1000)) { - *errcode = EAGAIN; + *errcode = MP_EAGAIN; return MP_STREAM_ERROR; } @@ -173,7 +173,7 @@ STATIC mp_uint_t pyb_uart_write(mp_obj_t self_in, const void *buf_in, mp_uint_t } STATIC mp_uint_t pyb_uart_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) { - *errcode = EINVAL; + *errcode = MP_EINVAL; return MP_STREAM_ERROR; } |