Merge pull request #3075 from liruncong/libc
[components/libc/compilers]c++文件引用libc.h支持
This commit is contained in:
commit
1b2a1263df
|
@ -12,11 +12,17 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
int libc_system_init(void);
|
int libc_system_init(void);
|
||||||
|
|
||||||
int libc_stdio_set_console(const char* device_name, int mode);
|
int libc_stdio_set_console(const char* device_name, int mode);
|
||||||
int libc_stdio_get_console(void);
|
int libc_stdio_get_console(void);
|
||||||
int libc_stdio_read (void *buffer, size_t size);
|
int libc_stdio_read(void* buffer, size_t size);
|
||||||
int libc_stdio_write(const void *buffer, size_t size);
|
int libc_stdio_write(const void* buffer, size_t size);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,11 +13,17 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
int libc_system_init(void);
|
int libc_system_init(void);
|
||||||
|
|
||||||
int libc_stdio_set_console(const char* device_name, int mode);
|
int libc_stdio_set_console(const char* device_name, int mode);
|
||||||
int libc_stdio_get_console(void);
|
int libc_stdio_get_console(void);
|
||||||
int libc_stdio_read (void *buffer, size_t size);
|
int libc_stdio_read(void* buffer, size_t size);
|
||||||
int libc_stdio_write(const void *buffer, size_t size);
|
int libc_stdio_write(const void* buffer, size_t size);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,13 +27,19 @@
|
||||||
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
||||||
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
int libc_system_init(void);
|
int libc_system_init(void);
|
||||||
int libc_stdio_set_console(const char* device_name, int mode);
|
int libc_stdio_set_console(const char* device_name, int mode);
|
||||||
int libc_stdio_get_console(void);
|
int libc_stdio_get_console(void);
|
||||||
|
|
||||||
/* some time related function */
|
/* some time related function */
|
||||||
int libc_set_time(const struct timespec *time);
|
int libc_set_time(const struct timespec* time);
|
||||||
int libc_get_time(struct timespec *time);
|
int libc_get_time(struct timespec* time);
|
||||||
int libc_time_to_tick(const struct timespec *time);
|
int libc_time_to_tick(const struct timespec* time);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue