Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
lpc23xx.h
1
/*
2
* SPDX-FileCopyrightText: 2009 Kaspar Schleiser <kaspar@schleiser.de>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
8
#include "vendor/lpc23xx.h"
9
#include "
arm7_common.h
"
10
#include "
bitarithm.h
"
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
27
#define F_CCO 288000000
28
34
#define CL_CPU_DIV 4
35
#define F_RC_OSCILLATOR 4000000
36
#define F_RTC_OSCILLATOR 32767
37
38
#define VIC_SIZE 32
39
64
#define PLLCFG_N(n) (((n) - 1) << 16)
65
#define PLLCFG_M(m) ((m) - 1)
67
68
#define GPIO_INT 17
69
#define IRQP_GPIO 4
70
71
#define _XTAL (72000)
72
77
#define IMSEC 0x00000001
78
#define IMMIN 0x00000002
79
#define IMHOUR 0x00000004
80
#define IMDOM 0x00000008
81
#define IMDOW 0x00000010
82
#define IMDOY 0x00000020
83
#define IMMON 0x00000040
84
#define IMYEAR 0x00000080
85
86
#define AMRSEC 0x00000001
/* Alarm mask for Seconds */
87
#define AMRMIN 0x00000002
/* Alarm mask for Minutes */
88
#define AMRHOUR 0x00000004
/* Alarm mask for Hours */
89
#define AMRDOM 0x00000008
/* Alarm mask for Day of Month */
90
#define AMRDOW 0x00000010
/* Alarm mask for Day of Week */
91
#define AMRDOY 0x00000020
/* Alarm mask for Day of Year */
92
#define AMRMON 0x00000040
/* Alarm mask for Month */
93
#define AMRYEAR 0x00000080
/* Alarm mask for Year */
94
95
#define ILR_RTCCIF BIT0
96
#define ILR_RTCALF BIT1
97
#define ILR_RTSSF BIT2
98
99
#define CCR_CLKEN 0x01
100
#define CCR_CTCRST 0x02
101
#define CCR_CLKSRC 0x10
103
108
#define WDEN BIT0
109
#define WDRESET BIT1
110
#define WDTOF BIT2
111
#define WDINT BIT3
113
118
#define EXTWAKE0 BIT0
119
#define EXTWAKE1 BIT1
120
#define EXTWAKE2 BIT2
121
#define EXTWAKE3 BIT3
122
#define ETHWAKE BIT4
123
#define USBWAKE BIT5
124
#define CANWAKE BIT6
125
#define GPIO0WAKE BIT7
126
#define GPIO2WAKE BIT8
127
#define BODWAKE BIT14
128
#define RTCWAKE BIT15
130
135
#define ULSR_RDR BIT0
136
#define ULSR_OE BIT1
137
#define ULSR_PE BIT2
138
#define ULSR_FE BIT3
139
#define ULSR_BI BIT4
140
#define ULSR_THRE BIT5
141
#define ULSR_TEMT BIT6
142
#define ULSR_RXFE BIT7
143
144
#define UIIR_INT_STATUS (BIT0)
145
#define UIIR_THRE_INT (BIT1)
146
#define UIIR_RDA_INT (BIT2)
147
#define UIIR_RLS_INT (BIT1 | BIT2)
148
#define UIIR_CTI_INT (BIT2 | BIT3)
149
#define UIIR_ID_MASK (BIT1 | BIT2 | BIT3)
150
#define UIIR_ABEO_INT BIT8
151
#define UIIR_ABTO_INT BIT9
153
158
#define SSPSR_TFE BIT0
159
#define SSPSR_TNF BIT1
160
#define SSPSR_RNE BIT2
161
#define SSPSR_RFF BIT3
162
#define SSPSR_BSY BIT4
164
169
#define TXIR 0x00
170
#define TXTCR 0x04
171
#define TXTC 0x08
172
#define TXPR 0x0C
173
#define TXPC 0x10
174
#define TXMCR 0x14
175
#define TXMR0 0x18
176
#define TXMR1 0x1C
177
#define TXMR2 0x20
178
#define TXMR3 0x24
179
#define TXCCR 0x28
180
#define TXCR0 0x2C
181
#define TXCR1 0x30
182
#define TXCR2 0x34
183
#define TXCR3 0x38
184
#define TXEMR 0x3C
185
#define TXCTCR 0x70
187
188
#ifdef __cplusplus
189
}
190
#endif
arm7_common.h
ARM7 CPU common declarations.
bitarithm.h
Helper functions for bit arithmetic.
Generated on Fri Oct 30 2026 11:09:05 by
1.13.2