libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
sdio.h
Go to the documentation of this file.
1/** @defgroup sdio_defines SDIO
2
3@brief <b>Defined Constants and Types for the LPC43xx SDIO</b>
4
5@ingroup LPC43xx_defines
6
7@version 1.0.0
8
9@author @htmlonly &copy; @endhtmlonly 2012 Michael Ossmann <mike@ossmann.com>
10
11@date 10 March 2013
12
13LGPL License Terms @ref lgpl_license
14 */
15/*
16 * This file is part of the libopencm3 project.
17 *
18 * Copyright (C) 2012 Michael Ossmann <mike@ossmann.com>
19 *
20 * This library is free software: you can redistribute it and/or modify
21 * it under the terms of the GNU Lesser General Public License as published by
22 * the Free Software Foundation, either version 3 of the License, or
23 * (at your option) any later version.
24 *
25 * This library is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public License
31 * along with this library. If not, see <http://www.gnu.org/licenses/>.
32 */
33
34#ifndef LPC43XX_SDIO_H
35#define LPC43XX_SDIO_H
36
37/**@{*/
38
41
42/* --- SDIO registers ----------------------------------------------------- */
43
44/* Control Register */
45#define SDIO_CTRL MMIO32(SDIO_BASE + 0x000)
46
47/* Power Enable Register */
48#define SDIO_PWREN MMIO32(SDIO_BASE + 0x004)
49
50/* Clock Divider Register */
51#define SDIO_CLKDIV MMIO32(SDIO_BASE + 0x008)
52
53/* SD Clock Source Register */
54#define SDIO_CLKSRC MMIO32(SDIO_BASE + 0x00C)
55
56/* Clock Enable Register */
57#define SDIO_CLKENA MMIO32(SDIO_BASE + 0x010)
58
59/* Time-out Register */
60#define SDIO_TMOUT MMIO32(SDIO_BASE + 0x014)
61
62/* Card Type Register */
63#define SDIO_CTYPE MMIO32(SDIO_BASE + 0x018)
64
65/* Block Size Register */
66#define SDIO_BLKSIZ MMIO32(SDIO_BASE + 0x01C)
67
68/* Byte Count Register */
69#define SDIO_BYTCNT MMIO32(SDIO_BASE + 0x020)
70
71/* Interrupt Mask Register */
72#define SDIO_INTMASK MMIO32(SDIO_BASE + 0x024)
73
74/* Command Argument Register */
75#define SDIO_CMDARG MMIO32(SDIO_BASE + 0x028)
76
77/* Command Register */
78#define SDIO_CMD MMIO32(SDIO_BASE + 0x02C)
79
80/* Response Register 0 */
81#define SDIO_RESP0 MMIO32(SDIO_BASE + 0x030)
82
83/* Response Register 1 */
84#define SDIO_RESP1 MMIO32(SDIO_BASE + 0x034)
85
86/* Response Register 2 */
87#define SDIO_RESP2 MMIO32(SDIO_BASE + 0x038)
88
89/* Response Register 3 */
90#define SDIO_RESP3 MMIO32(SDIO_BASE + 0x03C)
91
92/* Masked Interrupt Status Register */
93#define SDIO_MINTSTS MMIO32(SDIO_BASE + 0x040)
94
95/* Raw Interrupt Status Register */
96#define SDIO_RINTSTS MMIO32(SDIO_BASE + 0x044)
97
98/* Status Register */
99#define SDIO_STATUS MMIO32(SDIO_BASE + 0x048)
100
101/* FIFO Threshold Watermark Register */
102#define SDIO_FIFOTH MMIO32(SDIO_BASE + 0x04C)
103
104/* Card Detect Register */
105#define SDIO_CDETECT MMIO32(SDIO_BASE + 0x050)
106
107/* Write Protect Register */
108#define SDIO_WRTPRT MMIO32(SDIO_BASE + 0x054)
109
110/* Transferred CIU Card Byte Count Register */
111#define SDIO_TCBCNT MMIO32(SDIO_BASE + 0x05C)
112
113/* Transferred Host to BIU-FIFO Byte Count Register */
114#define SDIO_TBBCNT MMIO32(SDIO_BASE + 0x060)
115
116/* Debounce Count Register */
117#define SDIO_DEBNCE MMIO32(SDIO_BASE + 0x064)
118
119/* UHS-1 Register */
120#define SDIO_UHS_REG MMIO32(SDIO_BASE + 0x074)
121
122/* Hardware Reset */
123#define SDIO_RST_N MMIO32(SDIO_BASE + 0x078)
124
125/* Bus Mode Register */
126#define SDIO_BMOD MMIO32(SDIO_BASE + 0x080)
127
128/* Poll Demand Register */
129#define SDIO_PLDMND MMIO32(SDIO_BASE + 0x084)
130
131/* Descriptor List Base Address Register */
132#define SDIO_DBADDR MMIO32(SDIO_BASE + 0x088)
133
134/* Internal DMAC Status Register */
135#define SDIO_IDSTS MMIO32(SDIO_BASE + 0x08C)
136
137/* Internal DMAC Interrupt Enable Register */
138#define SDIO_IDINTEN MMIO32(SDIO_BASE + 0x090)
139
140/* Current Host Descriptor Address Register */
141#define SDIO_DSCADDR MMIO32(SDIO_BASE + 0x094)
142
143/* Current Buffer Descriptor Address Register */
144#define SDIO_BUFADDR MMIO32(SDIO_BASE + 0x098)
145
146/* Data FIFO read/write */
147#define SDIO_DATA MMIO32(SDIO_BASE + 0x100)
148
149/**@}*/
150
151#endif