TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SDSPIEUSCIB.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_SDSPIEUSCIB__include
51 #define ti_drivers_sdspi_SDSPIEUSCIB__include
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 #include <ti/drivers/SDSPI.h>
59 
60 /*
61  * DIR gets defined in msp430.h and ff.h
62  * We need the defined DIR data structure from ff.h
63  */
64 #undef DIR
65 
66 #include <ti/sysbios/fatfs/ff.h>
67 #include <ti/sysbios/fatfs/diskio.h>
68 
69 /* SDSPI function table */
71 
75 typedef enum SDSPIEUSCIB_CardType {
76  NOCARD = 0,
77  MMC = 1,
78  SDSC = 2,
79  SDHC = 3
81 
138 typedef struct SDSPIEUSCIB_HWAttrsV1 {
139  uint32_t baseAddr;
140  uint8_t clockSource;
142  uint8_t portSCK;
143  uint32_t pinSCK;
146  uint8_t portMISO;
147  uint32_t pinMISO;
150  uint8_t portMOSI;
151  uint32_t pinMOSI;
154  uint8_t portCS;
155  uint32_t pinCS;
157 
163 typedef struct SDSPIEUSCIB_Object {
164  uint16_t driveNumber;
165  DSTATUS diskState;
167  uint32_t bitRate;
168  FATFS filesystem;
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif /* ti_drivers_sdspi_SDSPIEUSCIB__include */
uint32_t pinCS
Definition: SDSPIEUSCIB.h:155
const SDSPI_FxnTable SDSPIEUSCIB_fxnTable
struct SDSPIEUSCIB_Object SDSPIEUSCIB_Object
SDSPIEUSCIB Object.
FATFS filesystem
Definition: SDSPIEUSCIB.h:168
SDSPIEUSCIB Object.
Definition: SDSPIEUSCIB.h:163
uint8_t portMOSI
Definition: SDSPIEUSCIB.h:150
struct SDSPIEUSCIB_HWAttrsV1 SDSPIEUSCIB_HWAttrsV1
uint8_t portCS
Definition: SDSPIEUSCIB.h:154
Definition: SDSPIEUSCIB.h:78
uint8_t portMISO
Definition: SDSPIEUSCIB.h:146
The definition of a SDSPI function table that contains the required set of functions to control a spe...
Definition: SDSPI.h:222
SDSPIEUSCIB_CardType
SD Card type inserted.
Definition: SDSPIEUSCIB.h:75
uint32_t pinMOSI
Definition: SDSPIEUSCIB.h:151
uint8_t pinMISOModeFunction
Definition: SDSPIEUSCIB.h:148
Definition: SDSPIEUSCIB.h:79
uint32_t bitRate
Definition: SDSPIEUSCIB.h:167
uint32_t pinMISO
Definition: SDSPIEUSCIB.h:147
SDSPI driver interface.
uint32_t baseAddr
Definition: SDSPIEUSCIB.h:139
Definition: SDSPIEUSCIB.h:77
uint8_t pinMOSIModeFunction
Definition: SDSPIEUSCIB.h:152
uint8_t clockSource
Definition: SDSPIEUSCIB.h:140
struct SDSPIEUSCIB_Object * SDSPIEUSCIB_Handle
uint8_t portSCK
Definition: SDSPIEUSCIB.h:142
SDSPIEUSCIB_CardType cardType
Definition: SDSPIEUSCIB.h:166
SDSPIEUSCIB Hardware attributes.
Definition: SDSPIEUSCIB.h:138
uint8_t pinSCKModeFunction
Definition: SDSPIEUSCIB.h:144
uint32_t pinSCK
Definition: SDSPIEUSCIB.h:143
uint16_t driveNumber
Definition: SDSPIEUSCIB.h:164
Definition: SDSPIEUSCIB.h:76
DSTATUS diskState
Definition: SDSPIEUSCIB.h:165
Copyright 2015, Texas Instruments Incorporated