@ -27,12 +27,12 @@
# include <stdio.h>
# include <string.h>
# include <stdbool.h>
# include <errno.h>
# include "py/nlr.h"
# include "py/obj.h"
# include "py/gc.h"
# include "py/runtime.h"
# include "py/mperrno.h"
# include "py/mphal.h"
# include "netutils.h"
# include "queue.h"
@ -577,7 +577,7 @@ STATIC mp_obj_t esp_flash_read(mp_obj_t offset_in, mp_obj_t len_or_buf_in) {
if ( alloc_buf ) {
m_del ( byte , buf , len ) ;
}
nlr_raise ( mp_obj_new_exception_arg1 ( & mp_type_OSError , MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? ETIMEDOUT : EIO) ) ) ;
nlr_raise ( mp_obj_new_exception_arg1 ( & mp_type_OSError , MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? MP_ ETIMEDOUT : MP_ EIO) ) ) ;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2 ( esp_flash_read_obj , esp_flash_read ) ;
@ -594,7 +594,7 @@ STATIC mp_obj_t esp_flash_write(mp_obj_t offset_in, const mp_obj_t buf_in) {
}
nlr_raise ( mp_obj_new_exception_arg1 (
& mp_type_OSError ,
MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? ETIMEDOUT : EIO) ) ) ;
MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? MP_ ETIMEDOUT : MP_ EIO) ) ) ;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2 ( esp_flash_write_obj , esp_flash_write ) ;
@ -606,7 +606,7 @@ STATIC mp_obj_t esp_flash_erase(mp_obj_t sector_in) {
}
nlr_raise ( mp_obj_new_exception_arg1 (
& mp_type_OSError ,
MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? ETIMEDOUT : EIO) ) ) ;
MP_OBJ_NEW_SMALL_INT ( res = = SPI_FLASH_RESULT_TIMEOUT ? MP_ ETIMEDOUT : MP_ EIO) ) ) ;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1 ( esp_flash_erase_obj , esp_flash_erase ) ;