/
GlobalTypes.h
56 lines (41 loc) · 1.01 KB
/
GlobalTypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "SystemDefinitions.h"
//-------------------------------------------------------------------------------------------------
// Use correct header for types
// This is different for the target platform because uboot implements types in lib/linux/types.h
//-------------------------------------------------------------------------------------------------
#if SYSTEM == XILINX_MICROBLAZE
#include <stdint.h>
#elif SYSTEM == XILINX_ARM_SOC
#include <stdint.h>
#elif SYSTEM == ALTERA_NIOS
#include <stdint.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#elif SYSTEM == ALTERA_ARM_SOC
#include <stdint.h>
#elif SYSTEM == UBOOT
#include <asm/types.h>
typedef s8 int8_t;
typedef u8 uint8_t;
typedef s16 int16_t;
typedef u16 uint16_t;
typedef s32 int32_t;
typedef u32 uint32_t;
typedef s64 int64_t;
typedef u64 uint64_t;
#define true 1
#define false 0
#endif
#ifndef __cplusplus
#define bool char
#define true 1
#define false 0
#endif
#ifndef NULL
#define NULL ((void *)0)
#endif