PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
Main Page
Modules
Data Structures
Files
File List
Globals
sdcmd.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2013 Spansion LLC. All Rights Reserved.
3
*
4
* This software is owned and published by:
5
* Spansion LLC, 915 DeGuigne Dr. Sunnyvale, CA 94088-3453 ("Spansion").
6
*
7
* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
8
* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
9
*
10
* This software contains source code for use with Spansion
11
* components. This software is licensed by Spansion to be adapted only
12
* for use in systems utilizing Spansion components. Spansion shall not be
13
* responsible for misuse or illegal use of this software for devices not
14
* supported herein. Spansion is providing this software "AS IS" and will
15
* not be responsible for issues arising from incorrect user implementation
16
* of the software.
17
*
18
* SPANSION MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
19
* REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
20
* ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
21
* WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
22
* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
23
* WARRANTY OF NONINFRINGEMENT.
24
* SPANSION SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
25
* NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
26
* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
27
* LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
28
* INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
29
* INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
30
* SAVINGS OR PROFITS,
31
* EVEN IF SPANSION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
32
* YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
33
* INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
34
* FROM, THE SOFTWARE.
35
*
36
* This software may be replicated in part or whole for the licensed use,
37
* with the restriction that this Disclaimer and Copyright notice must be
38
* included with each copy of this software, whether used in part or whole,
39
* at all times.
40
*/
41
/******************************************************************************/
52
#ifndef __SDCMD_H__
53
#define __SDCMD_H__
54
55
/******************************************************************************/
56
/* Include files */
57
/******************************************************************************/
58
59
#include "
sd\sd.h
"
60
61
#if (defined(PDL_PERIPHERAL_SD_ACTIVE))
62
63
/* C binding of definitions if building with C++ compiler */
64
#ifdef __cplusplus
65
extern
"C"
66
{
67
#endif
68
74
75
/******************************************************************************
76
* Global definitions
77
******************************************************************************/
78
#define SD_ACMD_OFFSET 0x40
79
80
//supported SD card command sets
81
#define SD_CMD0 (0)
82
#define SD_CMD2 (2)
83
#define SD_CMD3 (3)
84
85
#define SD_CMD7 (7)
86
#define SD_CMD8 (8)
87
#define SD_CMD9 (9)
88
#define SD_CMD10 (10)
89
90
#define SD_CMD12 (12)
91
#define SD_CMD13 (13)
92
93
#define SD_CMD16 (16)
94
#define SD_CMD17 (17)
95
#define SD_CMD18 (18)
96
97
#define SD_CMD24 (24)
98
#define SD_CMD25 (25)
99
100
#define SD_CMD28 (28)
101
#define SD_CMD29 (29)
102
#define SD_CMD30 (30)
103
104
#define SD_CMD55 (55)
105
106
107
#define SD_ACMD6 (SD_ACMD_OFFSET + 6)
108
#define SD_ACMD13 (SD_ACMD_OFFSET + 13)
109
#define SD_ACMD41 (SD_ACMD_OFFSET + 41)
110
#define SD_ACMD51 (SD_ACMD_OFFSET + 51)
111
112
#define CRC7_INIT 0
113
#define INIT_CCITT_CRC16 0x0000
114
/******************************************************************************
115
* Global type definitions
116
******************************************************************************/
117
118
/******************************************************************************/
119
/* Global variable declarations ('extern', definition in C source) */
120
/******************************************************************************/
121
122
/******************************************************************************/
123
/* Global function prototypes ('extern', definition in C source) */
124
/******************************************************************************/
125
extern
boolean_t
Sdcmd_SendCmd
(uint8_t u8Cmd,uint32_t u32Arg,uint32_t *pu32Buf);
126
extern
boolean_t
Sdcmd_RxData
(uint32_t* pu32Buf);
127
extern
boolean_t
Sdcmd_TxData
(uint32_t* pu32Buf);
128
/***ToDo for second release
129
130
**/
//ToDo for second release
131
133
#ifdef __cplusplus
134
}
135
#endif
136
137
#endif // #if (defined(PDL_PERIPHERAL_SD_ACTIVE))
138
139
#endif
/* __SDCMD_H__ */
140
/******************************************************************************/
141
/* EOF (not truncated) */
142
/******************************************************************************/
PDL_1_2
library
highlevel
sd
sdcmd.h
Generated on Wed May 28 2014 09:28:11 for PDL for FM4 by
1.8.3.1