ESPHome
2026.12.0-dev
Loading...
Searching...
No Matches
esphome
components
esp32_hosted
sdio_rx_staging.cpp
Go to the documentation of this file.
1
// Linker wrap for the esp_hosted 3.1.0 SDIO host. A co-processor older than 2.12.0 streams but does not say so in
2
// its init event, so the host fixes its RX staging buffers at one frame and then drops every larger read
3
// (esp-hosted-mcu#259). Skipping a one-frame target leaves the buffers growing on demand, as they did before 3.1.0.
4
5
#include "sdkconfig.h"
6
7
#ifdef CONFIG_ESP_HOSTED_HOST_TRANSPORT_BUS_SDIO
8
9
#include <cstdint>
10
11
namespace
esphome::esp32_hosted
{
12
13
// ESP_TRANSPORT_SDIO_MAX_BUF_SIZE
14
static
constexpr
uint32_t
SDIO_FRAME_SIZE = 1536;
15
16
}
// namespace esphome::esp32_hosted
17
18
// NOLINTBEGIN(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
19
extern
"C"
{
20
21
// Weak so a build that pins an esp_hosted before 3.1.0, which has no such function, still links
22
void
__real_eh_host_bus_sdio_set_rx_staging_target
(
uint32_t
target_size)
__attribute__
((weak));
23
24
void
__wrap_eh_host_bus_sdio_set_rx_staging_target
(
uint32_t
target_size) {
25
if
(target_size <= esphome::esp32_hosted::SDIO_FRAME_SIZE) {
26
return
;
27
}
28
__real_eh_host_bus_sdio_set_rx_staging_target
(target_size);
29
}
30
31
}
// extern "C"
32
// NOLINTEND(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,readability-identifier-naming)
33
34
#endif
// CONFIG_ESP_HOSTED_HOST_TRANSPORT_BUS_SDIO
__attribute__
struct @67::@68 __attribute__
Wake the main loop task from an ISR. ISR-safe.
Definition
main_task.h:45
esphome::esp32_hosted
Definition
sdio_rx_staging.cpp:11
uint32_t
static void uint32_t
Definition
crash_handler.cpp:179
__real_eh_host_bus_sdio_set_rx_staging_target
void __real_eh_host_bus_sdio_set_rx_staging_target(uint32_t target_size) __attribute__((weak))
__wrap_eh_host_bus_sdio_set_rx_staging_target
void __wrap_eh_host_bus_sdio_set_rx_staging_target(uint32_t target_size)
Definition
sdio_rx_staging.cpp:24
Generated by
1.12.0