aboutsummaryrefslogtreecommitdiffstats
path: root/fw/types.h
blob: 55a17f684e3aa394c5f91e01d352d79ba4386b67 (plain) (blame)
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
/* Device: PIC16F1459
 * Compiler: XC8 v3.00
 *
 * Usage:
 *
 * #include <stdint.h>
 * #include "types.h"
 */

typedef enum {
	OK,
	FAIL,
} Status;

typedef uint8_t U8;
typedef uint16_t U16;
typedef uint32_t U32;

typedef int8_t I8;
typedef int16_t I16;
typedef int32_t I32;

// Number
typedef struct {
	enum {
		NUM_U8,
		NUM_U16,
		NUM_U32,
		NUM_I8,
		NUM_I16,
		NUM_I32,
	} type;
	U8 u8;
	U16 u16;
	U32 u32;
	I8 i8;
	I16 i16;
	I32 i32;
} Number;