summaryrefslogtreecommitdiff
path: root/components/libc/compilers/armlibc/sys
diff options
context:
space:
mode:
authoryangjie <[email protected]>2020-12-28 12:02:31 +0800
committeryangjie <[email protected]>2020-12-28 12:02:31 +0800
commiteeaf1fcc50a9a6d25bebcc531db8e03baafaded3 (patch)
tree3a7e70fbb26fad36211874a5bc4f9f9f22c8fa38 /components/libc/compilers/armlibc/sys
parentef62febf1f2461bdd72efcffde050905865a99c5 (diff)
parente3e86337862c6d84f2b55906a49d48aa33084d39 (diff)
resolve Conflicts
bsp/nrf52832/board/Sconscript bsp/nrf52832/startups/Sconscript bsp/raspberry-pi/raspi4-32/driver/SConscript
Diffstat (limited to 'components/libc/compilers/armlibc/sys')
-rw-r--r--components/libc/compilers/armlibc/sys/types.h14
-rw-r--r--components/libc/compilers/armlibc/sys/unistd.h7
2 files changed, 14 insertions, 7 deletions
diff --git a/components/libc/compilers/armlibc/sys/types.h b/components/libc/compilers/armlibc/sys/types.h
index 2aad77c99d..78fee1bb99 100644
--- a/components/libc/compilers/armlibc/sys/types.h
+++ b/components/libc/compilers/armlibc/sys/types.h
@@ -5,20 +5,22 @@
*
* Change Logs:
* Date Author Notes
- * 2020-09-05 Meco Man fix bugs
+ * 2020-09-05 Meco Man fix bugs
+ * 2020-12-16 Meco Man add useconds_t
*/
#ifndef __TYPES_H__
#define __TYPES_H__
#include <stdint.h>
-typedef int32_t clockid_t;
-typedef int32_t key_t; /* Used for interprocess communication. */
-typedef int32_t pid_t; /* Used for process IDs and process group IDs. */
+typedef int32_t clockid_t;
+typedef int32_t key_t; /* Used for interprocess communication. */
+typedef int32_t pid_t; /* Used for process IDs and process group IDs. */
#ifndef ARCH_CPU_64BIT
-typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
+typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
#else
-typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */
+typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */
#endif
+typedef unsigned long useconds_t; /* microseconds (unsigned) */
#endif
diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h
index 524de2cf83..73a73a267e 100644
--- a/components/libc/compilers/armlibc/sys/unistd.h
+++ b/components/libc/compilers/armlibc/sys/unistd.h
@@ -5,11 +5,13 @@
*
* Change Logs:
* Date Author Notes
+ * 2020-12-16 Meco Man add usleep
*/
#ifndef _SYS_UNISTD_H
#define _SYS_UNISTD_H
-#include <rtthread.h>
+#include <rtconfig.h>
+#include "types.h"
#ifdef RT_USING_DFS
@@ -68,4 +70,7 @@
int isatty (int fd);
char * ttyname (int desc);
+unsigned int sleep(unsigned int seconds);
+int usleep(useconds_t usec);
+
#endif /* _SYS_UNISTD_H */