TI-RTOS for SimpleLink Wireless MCUs  2.14.03.28
SDSPIMSP432.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_SDSPIMSP432__include
51 #define ti_drivers_sdspi_SDSPIMSP432__include
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 
59 #include <ti/sysbios/fatfs/ff.h>
60 #include <ti/sysbios/fatfs/diskio.h>
61 
62 #include <ti/drivers/SDSPI.h>
63 
64 /* SDSPI function table */
66 
70 typedef enum SDSPIMSP432_CardType {
71  NOCARD = 0,
72  MMC = 1,
73  SDSC = 2,
74  SDHC = 3
76 
125 typedef struct SDSPIMSP432_HWAttrs {
126  uint32_t baseAddr;
127  uint8_t clockSource;
129  uint8_t portSCK;
130  uint16_t pinSCK;
131  uint8_t sckMode;
133  uint8_t portMISO;
134  uint16_t pinMISO;
135  uint8_t misoMode;
137  uint8_t portMOSI;
138  uint16_t pinMOSI;
139  uint8_t mosiMode;
141  uint8_t portCS;
142  uint16_t pinCS;
144 
150 typedef struct SDSPIMSP432_Object {
151  uint16_t driveNumber;
152  DSTATUS diskState;
154  uint32_t bitRate;
155  FATFS filesystem;
160 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif /* ti_drivers_sdspi_SDSPIMSP432__include */
Definition: SDSPIMSP432.h:73
uint32_t baseAddr
Definition: SDSPIMSP432.h:126
struct SDSPIMSP432_Object SDSPIMSP432_Object
SDSPIMSP432 Object.
SDSPIMSP432 Object.
Definition: SDSPIMSP432.h:150
SDSPIMSP432_CardType
SD Card type inserted.
Definition: SDSPIMSP432.h:70
uint8_t misoMode
Definition: SDSPIMSP432.h:135
uint8_t portMOSI
Definition: SDSPIMSP432.h:137
Definition: SDSPIMSP432.h:74
Power_NotifyObj perfChangeNotify
Definition: SDSPIMSP432.h:157
const SDSPI_FxnTable SDSPIMSP432_fxnTable
uint16_t pinCS
Definition: SDSPIMSP432.h:142
Definition: SDSPIMSP432.h:72
The definition of a SDSPI function table that contains the required set of functions to control a spe...
Definition: SDSPI.h:222
struct SDSPIMSP432_HWAttrs SDSPIMSP432_HWAttrs
uint16_t driveNumber
Definition: SDSPIMSP432.h:151
struct SDSPIMSP432_Object * SDSPIMSP432_Handle
FATFS filesystem
Definition: SDSPIMSP432.h:155
DSTATUS diskState
Definition: SDSPIMSP432.h:152
SDSPI driver interface.
SDSPIMSP432 Hardware attributes.
Definition: SDSPIMSP432.h:125
uint8_t clockSource
Definition: SDSPIMSP432.h:127
uint8_t portSCK
Definition: SDSPIMSP432.h:129
Power notify object structure.
Definition: Power.h:112
uint8_t sckMode
Definition: SDSPIMSP432.h:131
uint8_t mosiMode
Definition: SDSPIMSP432.h:139
uint16_t pinSCK
Definition: SDSPIMSP432.h:130
uint8_t portMISO
Definition: SDSPIMSP432.h:133
uint32_t perfConstraintMask
Definition: SDSPIMSP432.h:158
uint16_t pinMOSI
Definition: SDSPIMSP432.h:138
uint16_t pinMISO
Definition: SDSPIMSP432.h:134
Definition: SDSPIMSP432.h:71
uint32_t bitRate
Definition: SDSPIMSP432.h:154
SDSPIMSP432_CardType cardType
Definition: SDSPIMSP432.h:153
uint8_t portCS
Definition: SDSPIMSP432.h:141
Copyright 2015, Texas Instruments Incorporated