SDIO.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2025, 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  */
32 
33 /*!***************************************************************************
34  * @file SDIO.h
35  * @brief Secure Digital Input Output (SDIO) Driver
36  *
37  * @anchor ti_drivers_SDIO_Overview
38  * # Overview
39  *
40  * The SDIO driver is designed to serve as an interface to perform basic
41  * transfers directly between Hosts.
42  *
43  * <hr>
44  * @anchor ti_drivers_SDIO_Usage
45  * # Usage
46  * SDIO (Secure Digital Input Output) provides a reliable and efficient method for
47  * connecting peripheral devices to a host system.
48  * It allows the host device, such as a microcontroller or processor, to communicate with various
49  * SDIO-compatible modules, including Wi-Fi, Bluetooth, GPS, and other external peripherals.
50  * The host can use standard SDIO commands to initialize and control the connected device.
51  *
52  * @anchor ti_drivers_SDIO_Synopsis
53  * ## Synopsis
54  * @anchor ti_drivers_SDIO_Synopsis_Code
55  *
56  * <hr>
57  * @anchor ti_drivers_SDIO_Configuration
58  * # Configuration
59  * Refer to the @ref driver_configuration "Driver's Configuration"
60  * section for driver configuration information.
61  *
62  * <hr>
63  ******************************************************************************
64  */
65 
66 #ifndef ti_drivers_SDIO__include
67 #define ti_drivers_SDIO__include
68 
69 #include <stdint.h>
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
85 #define SDIO_STATUS_SUCCESS (0)
86 
90 #define SDIO_STATUS_ERROR (-1)
91 
96 typedef struct SDIO_Config_ *SDIO_Handle;
97 
107 /* SDIO Parameters */
108 typedef struct
109 {
110  void *custom;
111 } SDIO_Params;
112 
124 typedef struct SDIO_Config_
125 {
126 
128  void *object;
129 
131  void const *hwAttrs;
132 } SDIO_Config;
133 
143 extern void SDIO_close(SDIO_Handle handle);
144 
153 extern void SDIO_init(void);
154 
160 extern void SDIO_Params_init(SDIO_Params *params);
161 
181 extern SDIO_Handle SDIO_open(uint_least8_t index, SDIO_Params *params);
182 
201 extern int_fast16_t SDIO_read(SDIO_Handle handle, void *buf, int_fast32_t numByte);
202 
221 extern int_fast16_t SDIO_write(SDIO_Handle handle, void *buf, int_fast32_t numByte);
222 
223 #ifdef __cplusplus
224 }
225 #endif
226 
227 #endif /* ti_drivers_SDIO__include */
void * custom
Definition: SDIO.h:110
ADC_Params params
Definition: Driver_Init.h:11
void const * hwAttrs
Definition: SDIO.h:131
SDIO Parameters.
Definition: SDIO.h:108
int_fast16_t SDIO_write(SDIO_Handle handle, void *buf, int_fast32_t numByte)
Function that writes data to SDIO host. The source is specified by buf. And the total number of bytes...
struct SDIO_Config_ SDIO_Config
SDIO Global configuration.
void SDIO_Params_init(SDIO_Params *params)
Function to initialize the SDIO_Params struct to its defaults.
int_fast16_t SDIO_read(SDIO_Handle handle, void *buf, int_fast32_t numByte)
Function that reads the data from SDIO host. The destination is specified by buf. And the total numbe...
void SDIO_close(SDIO_Handle handle)
Function to close a SDIO peripheral specified by the SDIO handle.
SDIO Global configuration.
Definition: SDIO.h:124
void SDIO_init(void)
This function initializes the SDIO driver.
void * object
Definition: SDIO.h:128
SDIO_Handle SDIO_open(uint_least8_t index, SDIO_Params *params)
Function to open the SDIO peripheral with the index and parameters specified.
struct SDIO_Config_ * SDIO_Handle
A handle that is returned from a SDIO_open() call.
Definition: SDIO.h:96
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale