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
16
#define F_CCO 288000000
17
#define CL_CPU_DIV 4
18
#define F_RC_OSCILLATOR 4000000
19
#define F_RTC_OSCILLATOR 32767
20
21
#define VIC_SIZE 32
22
23
#define PLLCFG_N(n) ((n - 1) << 16)
24
#define PLLCFG_M(m) (m - 1)
25
26
#define GPIO_INT 17
27
#define IRQP_GPIO 4
28
29
#define _XTAL (72000)
30
35
#define IMSEC 0x00000001
36
#define IMMIN 0x00000002
37
#define IMHOUR 0x00000004
38
#define IMDOM 0x00000008
39
#define IMDOW 0x00000010
40
#define IMDOY 0x00000020
41
#define IMMON 0x00000040
42
#define IMYEAR 0x00000080
43
44
#define AMRSEC 0x00000001
/* Alarm mask for Seconds */
45
#define AMRMIN 0x00000002
/* Alarm mask for Minutes */
46
#define AMRHOUR 0x00000004
/* Alarm mask for Hours */
47
#define AMRDOM 0x00000008
/* Alarm mask for Day of Month */
48
#define AMRDOW 0x00000010
/* Alarm mask for Day of Week */
49
#define AMRDOY 0x00000020
/* Alarm mask for Day of Year */
50
#define AMRMON 0x00000040
/* Alarm mask for Month */
51
#define AMRYEAR 0x00000080
/* Alarm mask for Year */
52
53
#define ILR_RTCCIF BIT0
54
#define ILR_RTCALF BIT1
55
#define ILR_RTSSF BIT2
56
57
#define CCR_CLKEN 0x01
58
#define CCR_CTCRST 0x02
59
#define CCR_CLKSRC 0x10
61
66
#define WDEN BIT0
67
#define WDRESET BIT1
68
#define WDTOF BIT2
69
#define WDINT BIT3
71
76
#define EXTWAKE0 BIT0
77
#define EXTWAKE1 BIT1
78
#define EXTWAKE2 BIT2
79
#define EXTWAKE3 BIT3
80
#define ETHWAKE BIT4
81
#define USBWAKE BIT5
82
#define CANWAKE BIT6
83
#define GPIO0WAKE BIT7
84
#define GPIO2WAKE BIT8
85
#define BODWAKE BIT14
86
#define RTCWAKE BIT15
88
93
#define ULSR_RDR BIT0
94
#define ULSR_OE BIT1
95
#define ULSR_PE BIT2
96
#define ULSR_FE BIT3
97
#define ULSR_BI BIT4
98
#define ULSR_THRE BIT5
99
#define ULSR_TEMT BIT6
100
#define ULSR_RXFE BIT7
101
102
#define UIIR_INT_STATUS (BIT0)
103
#define UIIR_THRE_INT (BIT1)
104
#define UIIR_RDA_INT (BIT2)
105
#define UIIR_RLS_INT (BIT1 | BIT2)
106
#define UIIR_CTI_INT (BIT2 | BIT3)
107
#define UIIR_ID_MASK (BIT1 | BIT2 | BIT3)
108
#define UIIR_ABEO_INT BIT8
109
#define UIIR_ABTO_INT BIT9
111
116
#define SSPSR_TFE BIT0
117
#define SSPSR_TNF BIT1
118
#define SSPSR_RNE BIT2
119
#define SSPSR_RFF BIT3
120
#define SSPSR_BSY BIT4
122
127
#define TXIR 0x00
128
#define TXTCR 0x04
129
#define TXTC 0x08
130
#define TXPR 0x0C
131
#define TXPC 0x10
132
#define TXMCR 0x14
133
#define TXMR0 0x18
134
#define TXMR1 0x1C
135
#define TXMR2 0x20
136
#define TXMR3 0x24
137
#define TXCCR 0x28
138
#define TXCR0 0x2C
139
#define TXCR1 0x30
140
#define TXCR2 0x34
141
#define TXCR3 0x38
142
#define TXEMR 0x3C
143
#define TXCTCR 0x70
145
146
#ifdef __cplusplus
147
}
148
#endif
arm7_common.h
ARM7 CPU common declarations.
bitarithm.h
Helper functions for bit arithmetic.
Generated on Mon Sep 22 2025 16:17:34 by
1.13.2