TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SDSPICC3200.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
50 #ifndef ti_drivers_sdspi_SDSPICC3200__include
51 #define ti_drivers_sdspi_SDSPICC3200__include
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 #include <ti/drivers/SDSPI.h>
59 
60 #include <ti/sysbios/fatfs/ff.h>
61 #include <ti/sysbios/fatfs/diskio.h>
62 
63 typedef unsigned long SDSPIBaseAddrType;
64 typedef unsigned long SDSPIDataType;
65 
66 /* SDSPI function table */
68 
72 typedef enum SDSPICC3200_CardType {
73  NOCARD = 0,
74  MMC = 1,
75  SDSC = 2,
76  SDHC = 3
78 
129 typedef struct SDSPICC3200_HWAttrs {
131  uint32_t baseAddr;
132 
134  uint32_t spiPRCM;
135 
137  uint32_t csGPIOBase;
139  uint32_t csGPIOPin;
140 
142  uint32_t txGPIOBase;
144  uint32_t txGPIOPin;
146  uint32_t txGPIOMode;
148  uint32_t txSPIMode;
150  uint32_t txPackPin;
152 
158 typedef struct SDSPICC3200_Object {
159  uint32_t driveNumber;
160  DSTATUS diskState;
162  uint32_t bitRate;
163  FATFS filesystem;
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #endif /* ti_drivers_sdspi_SDSPICC3200__include */
uint32_t csGPIOPin
Definition: SDSPICC3200.h:139
FATFS filesystem
Definition: SDSPICC3200.h:163
uint32_t txGPIOBase
Definition: SDSPICC3200.h:142
uint32_t bitRate
Definition: SDSPICC3200.h:162
DSTATUS diskState
Definition: SDSPICC3200.h:160
Definition: SDSPICC3200.h:76
uint32_t baseAddr
Definition: SDSPICC3200.h:131
The definition of a SDSPI function table that contains the required set of functions to control a spe...
Definition: SDSPI.h:222
struct SDSPICC3200_HWAttrs SDSPICC3200_HWAttrs
uint32_t driveNumber
Definition: SDSPICC3200.h:159
struct SDSPICC3200_Object SDSPICC3200_Object
SDSPICC3200 Object.
uint32_t txGPIOMode
Definition: SDSPICC3200.h:146
uint32_t spiPRCM
Definition: SDSPICC3200.h:134
SDSPICC3200_CardType cardType
Definition: SDSPICC3200.h:161
SDSPICC3200 Hardware attributes.
Definition: SDSPICC3200.h:129
SDSPI driver interface.
uint32_t txSPIMode
Definition: SDSPICC3200.h:148
Definition: SDSPICC3200.h:73
SDSPICC3200 Object.
Definition: SDSPICC3200.h:158
Definition: SDSPICC3200.h:75
uint32_t txPackPin
Definition: SDSPICC3200.h:150
const SDSPI_FxnTable SDSPICC3200_fxnTable
struct SDSPICC3200_Object * SDSPICC3200_Handle
SDSPICC3200_CardType
SD Card type inserted.
Definition: SDSPICC3200.h:72
Definition: SDSPICC3200.h:74
unsigned long SDSPIDataType
Definition: SDSPICC3200.h:64
uint32_t csGPIOBase
Definition: SDSPICC3200.h:137
uint32_t txGPIOPin
Definition: SDSPICC3200.h:144
unsigned long SDSPIBaseAddrType
Definition: SDSPICC3200.h:63
Copyright 2015, Texas Instruments Incorporated