![]() |
![]() |
Secure Digital Input Output (SDIO) Driver.
The SDIO driver is designed to serve as an interface to perform basic transfers directly between Hosts.
SDIO (Secure Digital Input Output) provides a reliable and efficient method for connecting peripheral devices to a host system. It allows the host device, such as a microcontroller or processor, to communicate with various SDIO-compatible modules, including Wi-Fi, Bluetooth, GPS, and other external peripherals. The host can use standard SDIO commands to initialize and control the connected device.
Refer to the Driver's Configuration section for driver configuration information.
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
| struct | SDIO_Params |
| SDIO Parameters. More... | |
| struct | SDIO_Config_ |
| SDIO Global configuration. More... | |
Macros | |
| #define | SDIO_STATUS_SUCCESS (0) |
| Successful status code returned by SDIO driver. More... | |
| #define | SDIO_STATUS_ERROR (-1) |
| Generic error status code returned by SDIO driver. More... | |
Typedefs | |
| typedef struct SDIO_Config_ * | SDIO_Handle |
| A handle that is returned from a SDIO_open() call. More... | |
| typedef struct SDIO_Config_ | SDIO_Config |
| SDIO Global configuration. More... | |
Functions | |
| void | SDIO_close (SDIO_Handle handle) |
| Function to close a SDIO peripheral specified by the SDIO handle. More... | |
| void | SDIO_init (void) |
| This function initializes the SDIO driver. More... | |
| void | SDIO_Params_init (SDIO_Params *params) |
| Function to initialize the SDIO_Params struct to its defaults. More... | |
| SDIO_Handle | SDIO_open (uint_least8_t index, SDIO_Params *params) |
| Function to open the SDIO peripheral with the index and parameters specified. More... | |
| 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 number of bytes to read is provided by numByte. More... | |
| 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 to read is provided by numByte. More... | |
| typedef struct SDIO_Config_* SDIO_Handle |
A handle that is returned from a SDIO_open() call.
| typedef struct SDIO_Config_ SDIO_Config |
SDIO Global configuration.
The SDIO_Config structure contains a set of pointers used to characterize the SDIO driver implementation.
This structure needs to be defined before calling SDIO_init() and it must not be changed thereafter.
| void SDIO_close | ( | SDIO_Handle | handle | ) |
Function to close a SDIO peripheral specified by the SDIO handle.
| handle | An SDIO_Handle returned from SDIO_open() |
| void SDIO_init | ( | void | ) |
This function initializes the SDIO driver.
| void SDIO_Params_init | ( | SDIO_Params * | params | ) |
Function to initialize the SDIO_Params struct to its defaults.
| params | A pointer to SDIO_Params structure for initialization. |
| SDIO_Handle SDIO_open | ( | uint_least8_t | index, |
| SDIO_Params * | params | ||
| ) |
Function to open the SDIO peripheral with the index and parameters specified.
| index | Logical peripheral number for the SDIO indexed into the SDIO_Config[] table. |
| params | Pointer to a parameter block, if NULL it will use default values. All the fields in this structure are RO (read-only). |
| 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 number of bytes to read is provided by numByte.
| handle | An SDIO_Handle returned from SDIO_open(). |
| buf | Pointer to a buffer to read data into. |
| numByte | Number of bytes to be read. |
| 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 to read is provided by numByte.
| handle | An SDIO_Handle returned from SDIO_open(). |
| buf | Pointer to a buffer containing data to write to disk. |
| numByte | Number of bytes to be written. |