ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
port_esp_hosted_host_sdio.h File Reference

esp-hosted port header: SDIO transport constants. More...

#include <stdint.h>
#include "esp_hosted_transport.h"
Include dependency graph for port_esp_hosted_host_sdio.h:

Go to the source code of this file.

Macros

#define MAX_TRANSPORT_BUFFER_SIZE   (ESP_TRANSPORT_SDIO_MAX_BUF_SIZE)
 Bytes moved in one SDIO block transfer.
#define ESP_HOSTED_SDIO_UNRESPONSIVE_CODE   (0xFFFFFFFFU)
 All-ones word returned when the SDIO co-processor does not answer.

Detailed Description

esp-hosted port header: SDIO transport constants.

Tag
[Ring 4 / PORT] {World: NS}

One of the ten port headers the vendored esp-hosted core includes by name (see docs/SOUP/esp-hosted-host.md). Transport selection happens inside shared vendored files, so this header must exist and must define its two symbols even though this project selects H_TRANSPORT_SPI: host/drivers/transport/transport_drv.h picks the matching header with a preprocessor chain, and the SDIO driver TU is still parsed by tooling that walks the vendored tree.

The values are the upstream defaults for the SDIO transport, taken from the vendored common/transport/esp_hosted_transport.h (ESP_TRANSPORT_SDIO_MAX_BUF_SIZE) and from the SDIO driver's own unresponsive-peripheral sentinel. They are correct rather than merely present: if the SDIO transport is ever selected on this board they are the values it needs.

Since
0.1.0

Definition in file port_esp_hosted_host_sdio.h.

Macro Definition Documentation

◆ ESP_HOSTED_SDIO_UNRESPONSIVE_CODE

#define ESP_HOSTED_SDIO_UNRESPONSIVE_CODE   (0xFFFFFFFFU)

All-ones word returned when the SDIO co-processor does not answer.

The SDIO driver reads peripheral registers over the bus; a card that has stopped clocking reads back as every bit set. The driver compares against this sentinel to tell "register value 0xFFFFFFFF" from "no answer at all" and restarts the transport.

Note
Read-only build configuration.
Warning
A genuine register whose value is all-ones is indistinguishable from an unresponsive peripheral; upstream accepts that.
Example:
if (reg == ESP_HOSTED_SDIO_UNRESPONSIVE_CODE) { restart_transport(); }
#define ESP_HOSTED_SDIO_UNRESPONSIVE_CODE
All-ones word returned when the SDIO co-processor does not answer.
Since
0.1.0

Definition at line 71 of file port_esp_hosted_host_sdio.h.

◆ MAX_TRANSPORT_BUFFER_SIZE

#define MAX_TRANSPORT_BUFFER_SIZE   (ESP_TRANSPORT_SDIO_MAX_BUF_SIZE)

Bytes moved in one SDIO block transfer.

Derived from the vendored ESP_TRANSPORT_SDIO_MAX_BUF_SIZE (1536), which is the SDIO transport's own frame size and is deliberately smaller than the SPI one.

Note
Read-only build configuration.
Warning
Only meaningful when H_TRANSPORT_IN_USE == H_TRANSPORT_SDIO.
Example:
uint8_t *buf = malloc(MAX_TRANSPORT_BUFFER_SIZE);
#define MAX_TRANSPORT_BUFFER_SIZE
Bytes moved in one SDIO block transfer.
Since
0.1.0

Definition at line 53 of file port_esp_hosted_host_sdio.h.

Referenced by internal_do_bus_transfer().