Loading...
Searching...
No Matches
sdhc_state_t Struct Reference

SD Card driver context. More...

Detailed Description

SD Card driver context.

Definition at line 41 of file sdhc.h.

#include <sdhc.h>

Data Fields

Sdhc * dev
 SDHC instance

 
gpio_t cd
 Card detect pin

 
gpio_t wp
 Write Protect pin

 
mutex_t lock
 Ensure thread-safe access

 
mutex_t sync
 ISR mutex

 
uint32_t sectors
 Capacity in bytes

 
uint32_t clock
 Accepted Cloc Rate in Hz

 
uint16_t rca
 Relative Card Address

 
uint16_t error
 Last error state

 
uint8_t type
 Type of Card

 
uint8_t version
 Version of Card

 
uint8_t bus_width
 Acceptable Bus Width (1 or 4)
 
bool high_speed
 Turbo mode

 
bool need_init
 Card installed but not initialized if true.
 

Field Documentation

◆ bus_width

uint8_t sdhc_state_t::bus_width

Acceptable Bus Width (1 or 4)

Definition at line 53 of file sdhc.h.

◆ cd

gpio_t sdhc_state_t::cd

Card detect pin

Definition at line 43 of file sdhc.h.

◆ clock

uint32_t sdhc_state_t::clock

Accepted Cloc Rate in Hz

Definition at line 48 of file sdhc.h.

◆ dev

Sdhc* sdhc_state_t::dev

SDHC instance

Definition at line 42 of file sdhc.h.

◆ error

uint16_t sdhc_state_t::error

Last error state

Definition at line 50 of file sdhc.h.

◆ high_speed

bool sdhc_state_t::high_speed

Turbo mode

Definition at line 54 of file sdhc.h.

◆ lock

mutex_t sdhc_state_t::lock

Ensure thread-safe access

Definition at line 45 of file sdhc.h.

◆ need_init

bool sdhc_state_t::need_init

Card installed but not initialized if true.

Definition at line 55 of file sdhc.h.

◆ rca

uint16_t sdhc_state_t::rca

Relative Card Address

Definition at line 49 of file sdhc.h.

◆ sectors

uint32_t sdhc_state_t::sectors

Capacity in bytes

Definition at line 47 of file sdhc.h.

◆ sync

mutex_t sdhc_state_t::sync

ISR mutex

Definition at line 46 of file sdhc.h.

◆ type

uint8_t sdhc_state_t::type

Type of Card

Definition at line 51 of file sdhc.h.

◆ version

uint8_t sdhc_state_t::version

Version of Card

Definition at line 52 of file sdhc.h.

◆ wp

gpio_t sdhc_state_t::wp

Write Protect pin

Definition at line 44 of file sdhc.h.


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