Skip to content

Commit 69164ed

Browse files
committed
feat(sdio): supported sdio on esp32c5
1 parent 8d02253 commit 69164ed

File tree

14 files changed

+612
-17
lines changed

14 files changed

+612
-17
lines changed

components/esp_driver_sdio/src/sdio_slave.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -325,11 +325,11 @@ static inline esp_err_t sdio_slave_hw_init(sdio_slave_config_t *config)
325325

326326
static void recover_pin(int pin, int sdio_func)
327327
{
328-
uint32_t reg = GPIO_PIN_MUX_REG[pin];
329-
assert(reg != UINT32_MAX);
328+
gpio_io_config_t io_cfg = {};
329+
esp_err_t ret = gpio_get_io_config(pin, &io_cfg);
330+
assert(ret == ESP_OK);
330331

331-
int func = REG_GET_FIELD(reg, MCU_SEL);
332-
if (func == sdio_func) {
332+
if (io_cfg.fun_sel == sdio_func) {
333333
gpio_set_direction(pin, GPIO_MODE_INPUT);
334334
gpio_func_sel(pin, PIN_FUNC_GPIO);
335335
}

components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| Supported Targets | ESP32 | ESP32-C6 |
2-
| ----------------- | ----- | -------- |
1+
| Supported Targets | ESP32 | ESP32-C5 | ESP32-C6 |
2+
| ----------------- | ----- | -------- | -------- |
33

44
# SDIO Cross Chips Test Apps: SDIO Slave App
55

components/hal/esp32/include/hal/sdio_slave_ll.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
#pragma once
1818

19+
#include <sys/queue.h>
20+
#include <stdbool.h>
1921
#include "hal/sdio_slave_types.h"
2022
#include "hal/misc.h"
2123
#include "soc/sdio_slc_struct.h"
2224
#include "soc/sdio_slc_reg.h"
2325
#include "soc/sdio_slc_host_struct.h"
2426
#include "soc/sdio_slc_host_reg.h"
2527
#include "soc/sdio_hinf_struct.h"
26-
#include "soc/lldesc.h"
2728
#include "soc/dport_reg.h"
2829

2930
#ifdef __cplusplus

0 commit comments

Comments
 (0)