Przeglądaj źródła

OS: Fix wrong rt_hw_console_getchar implementation

Signed-off-by: Huaqi Fang <578567190@qq.com>
Huaqi Fang 5 lat temu
rodzic
commit
d27a2dab4e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      OS/RTThread/libcpu/risc-v/nuclei/cpuport.c

+ 1 - 1
OS/RTThread/libcpu/risc-v/nuclei/cpuport.c

@@ -233,7 +233,7 @@ extern ssize_t _read(int fd, void* ptr, size_t len);
 char rt_hw_console_getchar(void)
 {
     int ch = -1;
-    _read(STDOUT_FILENO, &ch, 1);
+    _read(STDIN_FILENO, &ch, 1);
     return ch;
 }