TI-RTOS Drivers  tidrivers_full_2_20_00_08
SDSPIEUSCIA.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  */
52 #ifndef ti_drivers_sdspi_SDSPIEUSCIA__include
53 #define ti_drivers_sdspi_SDSPIEUSCIA__include
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 #include <stdint.h>
60 #include <ti/drivers/SDSPI.h>
61 
62 /*
63  * DIR gets defined in msp430.h and ff.h
64  * We need the defined DIR data structure from ff.h
65  */
66 #undef DIR
67 
68 #include <ti/mw/fatfs/ff.h>
69 #include <ti/mw/fatfs/diskio.h>
70 
81 /* Add SDSPIEUSCIA_STATUS_* macros here */
82 
95 /* Add SDSPIEUSCIA_CMD_* macros here */
96 
99 /* SDSPI function table */
101 
105 typedef enum SDSPIEUSCIA_CardType {
111 
169 typedef struct SDSPIEUSCIA_HWAttrsV1 {
170  uint32_t baseAddr;
171  uint8_t clockSource;
173  uint8_t portSCK;
174  uint32_t pinSCK;
177  uint8_t portMISO;
178  uint32_t pinMISO;
181  uint8_t portMOSI;
182  uint32_t pinMOSI;
185  uint8_t portCS;
186  uint32_t pinCS;
188 
194 typedef struct SDSPIEUSCIA_Object {
195  uint16_t driveNumber;
198  uint32_t bitRate;
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif /* ti_drivers_sdspi_SDSPIEUSCIA__include */
uint8_t pinSCKModeFunction
Definition: SDSPIEUSCIA.h:175
SDSPIEUSCIA Object.
Definition: SDSPIEUSCIA.h:194
Definition: SDSPIEUSCIA.h:107
Definition: ff.h:78
The definition of a SDSPI function table that contains the required set of functions to control a spe...
Definition: SDSPI.h:241
uint32_t pinSCK
Definition: SDSPIEUSCIA.h:174
uint32_t pinMOSI
Definition: SDSPIEUSCIA.h:182
uint32_t baseAddr
Definition: SDSPIEUSCIA.h:170
struct SDSPIEUSCIA_Object SDSPIEUSCIA_Object
SDSPIEUSCIA Object.
uint32_t pinMISO
Definition: SDSPIEUSCIA.h:178
uint32_t bitRate
Definition: SDSPIEUSCIA.h:198
struct SDSPIEUSCIA_Object * SDSPIEUSCIA_Handle
uint8_t clockSource
Definition: SDSPIEUSCIA.h:171
Definition: SDSPIEUSCIA.h:109
BYTE DSTATUS
Definition: diskio.h:19
uint8_t portMISO
Definition: SDSPIEUSCIA.h:177
SDSPI driver interface.
SDSPIEUSCIA_CardType
SD Card type inserted.
Definition: SDSPIEUSCIA.h:105
uint8_t pinMOSIModeFunction
Definition: SDSPIEUSCIA.h:183
Definition: SDSPIEUSCIA.h:108
FATFS filesystem
Definition: SDSPIEUSCIA.h:199
SDSPIEUSCIA Hardware attributes.
Definition: SDSPIEUSCIA.h:169
uint8_t portCS
Definition: SDSPIEUSCIA.h:185
SDSPIEUSCIA_CardType cardType
Definition: SDSPIEUSCIA.h:197
uint8_t portMOSI
Definition: SDSPIEUSCIA.h:181
uint8_t portSCK
Definition: SDSPIEUSCIA.h:173
Definition: SDSPIEUSCIA.h:106
DSTATUS diskState
Definition: SDSPIEUSCIA.h:196
struct SDSPIEUSCIA_HWAttrsV1 SDSPIEUSCIA_HWAttrsV1
uint32_t pinCS
Definition: SDSPIEUSCIA.h:186
uint8_t pinMISOModeFunction
Definition: SDSPIEUSCIA.h:179
uint16_t driveNumber
Definition: SDSPIEUSCIA.h:195
const SDSPI_FxnTable SDSPIEUSCIA_fxnTable
Copyright 2016, Texas Instruments Incorporated