GPS Device
Loading...
Searching...
No Matches
SD_CFG_ts Struct Reference

Configuration structure for initializing an SD card handle. More...

#include <sd.h>

Collaboration diagram for SD_CFG_ts:

Public Attributes

char name [CONFIG_SD_MAX_NAME_LEN]
SPI_REGDEF_tsspi_instance
GPIO_REGDEF_tssclk_gpio_port
GPIO_REGDEF_tscs_gpio_port
GPIO_REGDEF_tsmiso_gpio_port
GPIO_REGDEF_tsmosi_gpio_port
GPIO_PIN_te sclk_gpio_pin
GPIO_PIN_te cs_gpio_pin
GPIO_PIN_te miso_gpio_pin
GPIO_PIN_te mosi_gpio_pin
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function

Detailed Description

Configuration structure for initializing an SD card handle.

Passed to sd_init_handle to configure the SPI peripheral and all four SPI GPIO pins (SCLK, CS, MISO, MOSI) connected to the SD card.

Note
The CS pin is configured as a GPIO output and driven manually. SCLK, MISO, and MOSI are configured in alternate function mode.

Definition at line 66 of file sd.h.

Member Data Documentation

◆ name

char SD_CFG_ts::name[CONFIG_SD_MAX_NAME_LEN]

Human-readable name for this SD card instance (null-terminated).

Definition at line 68 of file sd.h.

◆ spi_instance

SPI_REGDEF_ts* SD_CFG_ts::spi_instance

Pointer to the SPI peripheral instance connected to the SD card.

Definition at line 71 of file sd.h.

◆ sclk_gpio_port

GPIO_REGDEF_ts* SD_CFG_ts::sclk_gpio_port

GPIO port of the SPI SCLK pin.

Definition at line 74 of file sd.h.

◆ cs_gpio_port

GPIO_REGDEF_ts* SD_CFG_ts::cs_gpio_port

GPIO port of the SPI CS (chip select) pin.

Definition at line 77 of file sd.h.

◆ miso_gpio_port

GPIO_REGDEF_ts* SD_CFG_ts::miso_gpio_port

GPIO port of the SPI MISO pin.

Definition at line 80 of file sd.h.

◆ mosi_gpio_port

GPIO_REGDEF_ts* SD_CFG_ts::mosi_gpio_port

GPIO port of the SPI MOSI pin.

Definition at line 83 of file sd.h.

◆ sclk_gpio_pin

GPIO_PIN_te SD_CFG_ts::sclk_gpio_pin

GPIO pin number of the SPI SCLK pin.

Definition at line 86 of file sd.h.

◆ cs_gpio_pin

GPIO_PIN_te SD_CFG_ts::cs_gpio_pin

GPIO pin number of the SPI CS pin.

Definition at line 89 of file sd.h.

◆ miso_gpio_pin

GPIO_PIN_te SD_CFG_ts::miso_gpio_pin

GPIO pin number of the SPI MISO pin.

Definition at line 92 of file sd.h.

◆ mosi_gpio_pin

GPIO_PIN_te SD_CFG_ts::mosi_gpio_pin

GPIO pin number of the SPI MOSI pin.

Definition at line 95 of file sd.h.

◆ gpio_alternate_function

GPIO_ALTERNATE_FUNCTION_te SD_CFG_ts::gpio_alternate_function

Alternate function mapping for SCLK, MISO, and MOSI GPIO pins.

Definition at line 98 of file sd.h.


The documentation for this struct was generated from the following file: