diff options
author | Nao Pross <naopross@thearcway.org> | 2017-10-05 16:09:59 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-10-05 16:09:59 +0200 |
commit | eb169ea5a89909b90794e0388f89d6d372754e46 (patch) | |
tree | ce7e826fd2dd4e4248cb4f1fbf8ce2885c943f49 /sw/z80/libc | |
parent | Test units are now in their own folder 'z80_test', add programmer cli interface (diff) | |
download | z80uPC-eb169ea5a89909b90794e0388f89d6d372754e46.tar.gz z80uPC-eb169ea5a89909b90794e0388f89d6d372754e46.zip |
Move test units to z80/tests, and drivers are now statically linked
Makefiles for the test units were getting messier, so now drivers
(that need to be tested) are statically compiled in their own
folder under z80/drivers.
The kernel makefile and is now broken since everything has been moved.
Diffstat (limited to 'sw/z80/libc')
-rw-r--r-- | sw/z80/libc/include/stdint.h | 13 | ||||
-rw-r--r-- | sw/z80/libc/include/stdlib.h | 7 | ||||
-rw-r--r-- | sw/z80/libc/include/types.h | 60 |
3 files changed, 80 insertions, 0 deletions
diff --git a/sw/z80/libc/include/stdint.h b/sw/z80/libc/include/stdint.h new file mode 100644 index 0000000..5e8caf3 --- /dev/null +++ b/sw/z80/libc/include/stdint.h @@ -0,0 +1,13 @@ +#ifndef __STDINT_H__ +#define __STDINT_H__ + +typedef unsigned int uint; + +typedef char int8_t; +typedef unsigned char uint8_t; +typedef int int16_t; +typedef unsigned int uint16_t; +typedef long int int32_t; +typedef unsigned long int uint32_t; + +#endif // __STDINT_H__
\ No newline at end of file diff --git a/sw/z80/libc/include/stdlib.h b/sw/z80/libc/include/stdlib.h new file mode 100644 index 0000000..c69f573 --- /dev/null +++ b/sw/z80/libc/include/stdlib.h @@ -0,0 +1,7 @@ +#ifndef __STDLIB_H__ +#define __STDLIB_H__ + +#include "stdint.h" + + +#endif // __STDLIB_H__
\ No newline at end of file diff --git a/sw/z80/libc/include/types.h b/sw/z80/libc/include/types.h new file mode 100644 index 0000000..a083bfe --- /dev/null +++ b/sw/z80/libc/include/types.h @@ -0,0 +1,60 @@ +#ifndef __TYPES_H__ +#define __TYPES_H__ + +/* only types from primitive types are defined in this file */ + +typedef volatile unsigned char register_t; + +typedef unsigned int uint; + +typedef char int8_t; +typedef unsigned char uint8_t; +typedef int int16_t; +typedef unsigned int uint16_t; +typedef long int int32_t; +typedef unsigned long int uint32_t; + +typedef uint16_t size_t; +typedef int16_t ssize_t; + +typedef uint8_t pid_t; +typedef uint16_t ino_t; + +typedef uint8_t dev_t; +typedef uint32_t devsize_t; +typedef uint8_t fd_t; +typedef uint16_t blk_t; +typedef uint8_t user_t; +typedef struct { + uint8_t member[3]; +} uint24_t; + +typedef uint32_t fsize_t; + +typedef struct +{ + dev_t dev; // device id, global in the fs + ino_t inode; // inode id relative to the volume + +} inode_t; + +typedef struct time_s +{ + struct + { + uint minutes :6; + uint hour :5; + + } time; + + struct + { + uint day :5; + uint month :4; + uint year :12; + + } date; + +} time_t; + +#endif |