diff options
| author | Man, Jianting (Meco) <[email protected]> | 2022-01-08 10:29:41 -0500 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2022-01-09 00:20:32 +0800 |
| commit | bb1084556ff9395e6e5d908edfef9cab6f6fa4dc (patch) | |
| tree | 97e0844decee5d889c1b10d88d16db36bba44245 /components/libc/compilers/armlibc/syscalls.c | |
| parent | 353f717037b57f663ddce9447fd05700f3087a66 (diff) | |
[console] 解决在没有定义RT_USING_DEVICE的情况下使用device报错的问题
* [console] 解决在没有定义RT_USING_DEVICE的情况下使用device报错的问题
* format codes
* [libc] 整理格式
* refresh projects
Diffstat (limited to 'components/libc/compilers/armlibc/syscalls.c')
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index f4ced9d3c0..82c0f38b4f 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -204,7 +204,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) if (fh == STDOUT || fh == STDERR) { -#ifdef RT_USING_CONSOLE +#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE) rt_device_t console; console = rt_console_get_device(); if (console) @@ -214,7 +214,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) return 0; /* success */ #else return 0; /* error */ -#endif /* RT_USING_CONSOLE */ +#endif /* defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE) */ } else if (fh == STDIN) { |
