mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 17:18:24 +00:00
[libc] Add libc_stdio_get_console .
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
int libc_system_init(void);
|
||||
|
||||
int libc_stdio_set_console(const char* device_name, int mode);
|
||||
int libc_stdio_get_console(void);
|
||||
int libc_stdio_read (void *buffer, size_t size);
|
||||
int libc_stdio_write(const void *buffer, size_t size);
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ int libc_stdio_set_console(const char* device_name, int mode)
|
||||
return std_fd;
|
||||
}
|
||||
|
||||
int libc_stdio_get_console(void) {
|
||||
return std_fd;
|
||||
}
|
||||
|
||||
int libc_stdio_read(void *buffer, size_t size)
|
||||
{
|
||||
return read(std_fd, buffer, size);
|
||||
|
||||
Reference in New Issue
Block a user