LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
Main Page
Modules
Data Structures
Files
Related Pages
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
sdif_18xx_43xx.h
Go to the documentation of this file.
1
/*
2
* @brief LPC18xx/43xx SD/SDIO driver
3
*
4
* @note
5
* Copyright(C) NXP Semiconductors, 2012
6
* All rights reserved.
7
*
8
* @par
9
* Software that is described herein is for illustrative purposes only
10
* which provides customers with programming information regarding the
11
* LPC products. This software is supplied "AS IS" without any warranties of
12
* any kind, and NXP Semiconductors and its licensor disclaim any and
13
* all warranties, express or implied, including all implied warranties of
14
* merchantability, fitness for a particular purpose and non-infringement of
15
* intellectual property rights. NXP Semiconductors assumes no responsibility
16
* or liability for the use of the software, conveys no license or rights under any
17
* patent, copyright, mask work right, or any other intellectual property rights in
18
* or to any products. NXP Semiconductors reserves the right to make changes
19
* in the software without notification. NXP Semiconductors also makes no
20
* representation or warranty that such application will be suitable for the
21
* specified use without further testing or modification.
22
*
23
* @par
24
* Permission to use, copy, modify, and distribute this software and its
25
* documentation is hereby granted, under NXP Semiconductors' and its
26
* licensor's relevant copyrights in the software, without fee, provided that it
27
* is used in conjunction with NXP Semiconductors microcontrollers. This
28
* copyright, permission, and disclaimer notice must appear in all copies of
29
* this code.
30
*/
31
32
#ifndef __SDIF_18XX_43XX_H_
33
#define __SDIF_18XX_43XX_H_
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
38
46
#define US_TIMEOUT 1000000
47
#define MS_ACQUIRE_DELAY (10)
48
#define INIT_OP_RETRIES 50
49
#define SET_OP_RETRIES 1000
50
#define SDIO_BUS_WIDTH 4
51
#define SD_MMC_ENUM_CLOCK 400000
52
#define MMC_MAX_CLOCK 20000000
53
#define MMC_LOW_BUS_MAX_CLOCK 26000000
54
#define MMC_HIGH_BUS_MAX_CLOCK 52000000
55
#define SD_MAX_CLOCK 25000000
64
STATIC INLINE int32_t Chip_SDIF_CardNDetect(LPC_SDMMC_T *pSDMMC)
65
{
66
return
IP_SDMMC_CardNDetect
(pSDMMC);
67
}
68
76
STATIC
INLINE
int32_t
Chip_SDIF_CardWpOn
(
LPC_SDMMC_T
*pSDMMC)
77
{
78
return
IP_SDMMC_CardWpOn
(pSDMMC);
79
}
80
86
void
Chip_SDIF_Init
(
LPC_SDMMC_T
*pSDMMC);
87
93
void
Chip_SDIF_DeInit
(
LPC_SDMMC_T
*pSDMMC);
94
101
STATIC
INLINE
void
Chip_SDIF_PowerOff
(
LPC_SDMMC_T
*pSDMMC)
102
{
103
IP_SDMMC_PowerOff
(pSDMMC);
104
}
105
112
STATIC
INLINE
void
Chip_SDIF_PowerOn
(
LPC_SDMMC_T
*pSDMMC)
113
{
114
IP_SDMMC_PowerOn
(pSDMMC);
115
}
116
123
STATIC
INLINE
void
Chip_SDIF_SetIntMask
(
LPC_SDMMC_T
*pSDMMC,
uint32_t
iVal)
124
{
125
IP_SDMMC_SetIntMask
(pSDMMC, iVal);
126
}
127
133
uint32_t
Chip_SDIF_GetIntStatus
(
LPC_SDMMC_T
*pSDMMC);
134
139
#ifdef __cplusplus
140
}
141
#endif
142
143
#endif
/* __SDIF_18XX_43XX_H_ */
software
lpc_core
lpc_chip
chip_18xx_43xx
sdif_18xx_43xx.h
Generated on Fri May 10 2013 10:42:16 for LPCOpen Platform by
1.8.2