ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_sdmmc_spi_core_contracts_internal.h
Go to the documentation of this file.
1
9
10#pragma once
11
13
28RA8_INTERNAL static void internal_build_frame(sd_cmd_t cmd, uint32_t arg, uint8_t* out_frame);
29
45RA8_INTERNAL static ra8_err_t internal_read_r1(uint8_t* out_r1);
46
62
78RA8_INTERNAL static uint32_t internal_csd_to_blocks(const uint8_t* csd);
79
94
111
128
144
159
176
193RA8_INTERNAL static ra8_err_t internal_probe_card(bool* out_is_v2, bool* out_is_hc);
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_sdmmc_spi_card_type_t
Detected SD card capacity / addressing class.
static ra8_err_t internal_read_r3_or_r7_tail(uint32_t *out_word)
Read the four-byte tail of an R3 or R7 response.
static ra8_err_t internal_read_ocr(bool *out_is_hc)
Read OCR and classify high-capacity addressing.
static void internal_build_frame(sd_cmd_t cmd, uint32_t arg, uint8_t *out_frame)
Serialize one command and argument into an SD wire frame.
static ra8_err_t internal_send_cmd0(void)
Send CMD0 and require the idle-state response.
static ra8_err_t internal_probe_card(bool *out_is_v2, bool *out_is_hc)
Execute the wake, CMD0, CMD8, ACMD41, and OCR probe stages.
static ra8_err_t internal_read_r1(uint8_t *out_r1)
Poll and decode the one-byte R1 command response.
static ra8_err_t internal_set_block_len(void)
Set the fixed 512-byte block length for byte-addressed cards.
static ra8_sdmmc_spi_card_type_t internal_classify_card(bool is_v2, bool is_hc)
Map generation and CCS facts to the public card type.
static ra8_err_t internal_acmd41_loop(bool is_v2)
Poll ACMD41 until the card leaves idle state.
static uint32_t internal_csd_to_blocks(const uint8_t *csd)
Decode a CSD register into 512-byte logical blocks.
static ra8_err_t internal_send_cmd8(bool *out_is_v2)
Probe SD v2 voltage support with CMD8.
Module-private cross-TU surface for the SPI-mode SD card driver.
sd_cmd_t
Wire-byte for every command used by this driver.