heyuanjie87 5 лет назад
Родитель
Сommit
ceed63506e
1 измененных файлов с 11 добавлено и 10 удалено
  1. 11 10
      lib/utils/sys_stdio_mphal.c

+ 11 - 10
lib/utils/sys_stdio_mphal.c

@@ -85,15 +85,16 @@ STATIC mp_uint_t stdio_write(mp_obj_t self_in, const void *buf, mp_uint_t size,
     }
 }
 
-STATIC mp_uint_t stdio_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg, int *errcode) {
-    (void)self_in;
-    if (request == MP_STREAM_POLL) {
-        return mp_hal_stdio_poll(arg);
-    } else {
-        *errcode = MP_EINVAL;
-        return MP_STREAM_ERROR;
-    }
-}
+// TODO NOT IMPLEMENT STDIO_IOCTL ON RT-THREAD YET
+// STATIC mp_uint_t stdio_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t arg, int *errcode) {
+//     (void)self_in;
+//     if (request == MP_STREAM_POLL) {
+//         return mp_hal_stdio_poll(arg);
+//     } else {
+//         *errcode = MP_EINVAL;
+//         return MP_STREAM_ERROR;
+//     }
+// }
 
 STATIC mp_obj_t stdio_obj___exit__(size_t n_args, const mp_obj_t *args) {
     return mp_const_none;
@@ -122,7 +123,7 @@ STATIC MP_DEFINE_CONST_DICT(stdio_locals_dict, stdio_locals_dict_table);
 STATIC const mp_stream_p_t stdio_obj_stream_p = {
     .read = stdio_read,
     .write = stdio_write,
-    .ioctl = stdio_ioctl,
+    //.ioctl = stdio_ioctl,
     .is_text = true,
 };