-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathkstatus.h
83 lines (70 loc) · 3.35 KB
/
kstatus.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* __ ____
* / /__ _ __ / __/ __
* / //_/(_)/ /_ / / ___ ____ ___ __ __ / /_
* / ,< / // __/_\ \ / _ \ / __// _ \/ // // __/
* /_/|_|/_/ \__//___// .__//_/ \___/\_,_/ \__/
* /_/ github.com/KitSprout
*
* @file kstatus.h
* @author KitSprout
* @brief
*
*/
/* Define to prevent recursive inclusion ---------------------------------------------------*/
#ifndef __KSTATUS_H
#define __KSTATUS_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes --------------------------------------------------------------------------------*/
/* Define ----------------------------------------------------------------------------------*/
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef KSSTATUS
#define KSSTATUS
#define KS_OK (0U)
#define KS_ERROR (1U)
#define KS_BUSY (2U)
#define KS_TIMEOUT (3U)
#define KS_CLOSE (0U)
#define KS_OPEN (1U)
#define KS_DISABLE (0U)
#define KS_ENABLE (1U)
#define KS_NULL (0U)
#define KS_FALSE (0U)
#define KS_TRUE (1U)
#endif
#ifndef KSUNIT
#define KSUNIT
#define KS_U8 (0x0) /* 4'b 0000 */
#define KS_U16 (0x1) /* 4'b 0001 */
#define KS_U32 (0x2) /* 4'b 0010 */
#define KS_U64 (0x3) /* 4'b 0011 */
#define KS_I8 (0x4) /* 4'b 0100 */
#define KS_I16 (0x5) /* 4'b 0101 */
#define KS_I32 (0x6) /* 4'b 0110 */
#define KS_I64 (0x7) /* 4'b 0111 */
#define KS_F16 (0x9) /* 4'b 1001 */
#define KS_F32 (0xA) /* 4'b 1010 */
#define KS_F64 (0xB) /* 4'b 1011 */
#define KS_R0 (0x8) /* 4'b 1000 */
#define KS_R1 (0xC) /* 4'b 1100 */
#define KS_R2 (0xD) /* 4'b 1101 */
#define KS_R3 (0xE) /* 4'b 1110 */
#define KS_R4 (0xF) /* 4'b 1111 */
#endif
/* Macro -----------------------------------------------------------------------------------*/
/* Typedef ---------------------------------------------------------------------------------*/
/* Extern ----------------------------------------------------------------------------------*/
/* Functions -------------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif
/*************************************** END OF FILE ****************************************/