From 4f2ba9fbdcbafd7ae09199186320f4173bcc8c31 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 10 May 2016 23:25:39 +0100 Subject: 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. --- esp8266/modpybuart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'esp8266/modpybuart.c') diff --git a/esp8266/modpybuart.c b/esp8266/modpybuart.c index eefb38d998..5971ffecec 100644 --- a/esp8266/modpybuart.c +++ b/esp8266/modpybuart.c @@ -27,13 +27,13 @@ #include #include #include -#include #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; } -- cgit v1.2.3