-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC2500.h
145 lines (132 loc) · 3.04 KB
/
C2500.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef C2500_H
#define C2500_H
#ifndef __ASSEMBLER__
#include <stdint.h>
#define SYSCON (*(volatile uint16_t *)(0x02110000))
typedef union {
struct {
uint16_t PTR:8;
uint16_t :3;
uint16_t LED:1;
uint16_t PTRA:1;
uint16_t PTEN:1;
uint16_t :1;
uint16_t BEV:1;
};
struct {
uint16_t u16;
};
} __SYSCONbits_t;
#define SYSCONbits (*(volatile __SYSCONbits_t *)(0x02110000))
#define MEMCON (*(volatile uint16_t *)(0x02110002))
typedef union {
struct {
uint16_t :8;
uint16_t VPPEN:1;
uint16_t :1;
uint16_t RAMSZ1:1;
uint16_t RAMSZ0:1;
uint16_t ROMSZ1:1;
uint16_t ROMSZ0:1;
uint16_t :2;
};
struct {
uint16_t :10;
uint16_t RAMSZ:2;
uint16_t ROMSZ:2;
uint16_t :2;
};
struct {
uint16_t u16;
};
} __MEMCONbits_t;
#define MEMCONbits (*(volatile __MEMCONbits_t *)(0x02110002))
#define PERIPHACC (*(volatile uint16_t *)(0x02110004))
typedef union {
struct {
uint16_t :11;
uint16_t EN5:1;
uint16_t EN4:1;
uint16_t EN3:1;
uint16_t EN2:1;
uint16_t EN1:1;
uint16_t EN0:1;
};
struct {
uint16_t :11;
uint16_t EN:6;
};
struct {
uint16_t u16;
};
} __PERIPHACCbits_t;
#define PERIPHACCbits (*(volatile __PERIPHACCbits_t *)(0x02110004))
#define INTSRC (*(volatile uint16_t *)(0x02110006))
typedef union {
struct {
uint16_t :13;
uint16_t SER:1;
uint16_t ETH:1;
uint16_t :1;
};
struct {
uint16_t u16;
};
} __INTSRCbits_t;
#define INTSRCbits (*(volatile __INTSRCbits_t *)(0x02110006))
#define FLASHPD (*(volatile uint16_t *)(0x0211000A))
typedef union {
struct {
uint16_t :3;
uint16_t C0PD:1;
uint16_t C1PD:1;
uint16_t :1;
uint16_t C0PD5:1;
uint16_t C0PD2:1;
uint16_t :8;
};
struct {
uint16_t u16;
};
} __FLASHPDbits_t;
#define FLASHPDbits (*(volatile __FLASHPDbits_t *)(0x0211000A))
#define NOVRAM (*(volatile uint8_t *)(0x02110060))
typedef union {
struct {
uint8_t :4;
uint8_t CE:1;
uint8_t SK:1;
uint8_t DO:1;
uint8_t DI:1;
};
struct {
uint8_t u8;
};
} __NOVRAMbits_t;
#define NOVRAMbits (*(volatile __NOVRAMbits_t *)(0x02110060))
#define WDTCON (*(volatile uint8_t *)(0x02120040))
typedef union {
struct {
uint8_t :1;
uint8_t WDTEN:1;
uint8_t :6;
};
struct {
uint8_t u8;
};
} __WDTCONbits_t;
#define WDTCONbits (*(volatile __WDTCONbits_t *)(0x02120040))
#define WDTO (*(volatile uint16_t *)(0x02120050))
#define TIMERPS (*(volatile uint16_t *)(0x02120070))
#else /* __ASSEMBLER__ */
#define SYSCON 0x02110000
#define MEMCON 0x02110002
#define PERIPHACC 0x02110004
#define INTSRC 0x02110006
#define FLASHPD 0x0211000A
#define NOVRAM 0x02110060
#define WDTCON 0x02120040
#define WDTO 0x02120050
#define TIMERPS 0x02120070
#endif /* __ASSEMBLER__ */
#endif /* C2500_H */