SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
endian.h
Go to the documentation of this file.
1#ifndef __RISCV64_ENDIAN_H__
2#define __RISCV64_ENDIAN_H__
3
4#define LITTLE_ENDIAN (0x1234)
5#define BIG_ENDIAN (0x4321)
6
7#if (!defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN))
8#define __LITTLE_ENDIAN
9#endif
10
11#if defined(__LITTLE_ENDIAN)
12#define BYTE_ORDER LITTLE_ENDIAN
13#elif defined(__BIG_ENDIAN)
14#define BYTE_ORDER BIG_ENDIAN
15#else
16#error "Unknown byte order!"
17#endif
18
19#endif /* __RISCV64_ENDIAN_H__ */