diff options
| author | liruncong <[email protected]> | 2019-09-14 22:52:06 +0800 |
|---|---|---|
| committer | liruncong <[email protected]> | 2019-09-14 22:52:06 +0800 |
| commit | d76d30cf509e1945af652bf7921bba4d11e605e9 (patch) | |
| tree | 84ab16b41144172f2f0a2d51e99025b8ac955943 /components/libc/compilers/newlib/libc.h | |
| parent | 109576c86af59e7f970f6fdfb142f3edf0a12d87 (diff) | |
[components/libc/compilers]c++文件引用libc.h支持
Diffstat (limited to 'components/libc/compilers/newlib/libc.h')
| -rw-r--r-- | components/libc/compilers/newlib/libc.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/components/libc/compilers/newlib/libc.h b/components/libc/compilers/newlib/libc.h index ab9334fe26..e2613740b9 100644 --- a/components/libc/compilers/newlib/libc.h +++ b/components/libc/compilers/newlib/libc.h @@ -27,13 +27,19 @@ #define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND) #define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND) -int libc_system_init(void); -int libc_stdio_set_console(const char* device_name, int mode); -int libc_stdio_get_console(void); +#ifdef __cplusplus +extern "C" { +#endif + int libc_system_init(void); + int libc_stdio_set_console(const char* device_name, int mode); + int libc_stdio_get_console(void); -/* some time related function */ -int libc_set_time(const struct timespec *time); -int libc_get_time(struct timespec *time); -int libc_time_to_tick(const struct timespec *time); + /* some time related function */ + int libc_set_time(const struct timespec* time); + int libc_get_time(struct timespec* time); + int libc_time_to_tick(const struct timespec* time); +#ifdef __cplusplus +} +#endif #endif |
