Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
type.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2026 Efinix Inc. All rights reserved.
3// Full license header bsp/efinix/EfxSapphireSocRV64/include/LICENSE.MD
5
6#ifndef TYPE_H_
7#define TYPE_H_
8
9
10#include <stdint.h>
11
12#if __riscv_xlen == 64
13 typedef int64_t rv_int ;
14 typedef uint64_t rv_uint ;
15#else
16 typedef int32_t rv_int ;
17 typedef uint32_t rv_uint ;
18#endif
19
20typedef uint64_t u64;
21typedef int64_t s64;
22typedef uint32_t u32;
23typedef int32_t s32;
24typedef uint16_t u16;
25typedef int16_t s16;
26typedef uint8_t u8;
27typedef int8_t s8;
28
29#define BIT_0 (1 << 0)
30#define BIT_1 (1 << 1)
31#define BIT_2 (1 << 2)
32#define BIT_3 (1 << 3)
33#define BIT_4 (1 << 4)
34#define BIT_5 (1 << 5)
35#define BIT_6 (1 << 6)
36#define BIT_7 (1 << 7)
37#define BIT_8 (1 << 8)
38#define BIT_9 (1 << 9)
39#define BIT_10 (1 << 10)
40#define BIT_11 (1 << 11)
41#define BIT_12 (1 << 12)
42#define BIT_13 (1 << 13)
43#define BIT_14 (1 << 14)
44#define BIT_15 (1 << 15)
45#define BIT_16 (1 << 16)
46#define BIT_17 (1 << 17)
47#define BIT_18 (1 << 18)
48#define BIT_19 (1 << 19)
49#define BIT_20 (1 << 20)
50#define BIT_21 (1 << 21)
51#define BIT_22 (1 << 22)
52#define BIT_23 (1 << 23)
53#define BIT_24 (1 << 24)
54#define BIT_25 (1 << 25)
55#define BIT_26 (1 << 26)
56#define BIT_27 (1 << 27)
57#define BIT_28 (1 << 28)
58#define BIT_29 (1 << 29)
59#define BIT_30 (1 << 30)
60#define BIT_31 (1 << 31)
61
62
63
64#endif //TYPE_H_
uint32_t rv_uint
Definition type.h:17
int64_t s64
Definition type.h:21
uint64_t u64
Definition type.h:20
uint8_t u8
Definition type.h:26
int8_t s8
Definition type.h:27
int16_t s16
Definition type.h:25
int32_t rv_int
Definition type.h:16
uint16_t u16
Definition type.h:24
int32_t s32
Definition type.h:23
uint32_t u32
Definition type.h:22