mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-20 18:01:44 +00:00
feat(sd): sd host driver layer driver NG
This commit is contained in:
@@ -84,9 +84,8 @@ extern "C" {
|
||||
* SDMMC capabilities
|
||||
*/
|
||||
#define SDMMC_LL_SLOT_SUPPORT_GPIO_MATRIX(SLOT_ID) 0
|
||||
|
||||
|
||||
#define SDMMC_LL_IOMUX_FUNC 3
|
||||
#define SDMMC_LL_IOMUX_FUNC 3
|
||||
#define SDMMC_LL_HOST_CTLR_NUMS 1U
|
||||
|
||||
typedef enum {
|
||||
SDMMC_LL_DELAY_PHASE_0,
|
||||
@@ -102,11 +101,12 @@ typedef enum {
|
||||
/**
|
||||
* @brief Enable the bus clock for SDMMC module
|
||||
*
|
||||
* @param hw hardware instance address
|
||||
* @param en enable / disable
|
||||
* @param group_id Group ID
|
||||
* @param en enable / disable
|
||||
*/
|
||||
static inline void sdmmc_ll_enable_bus_clock(sdmmc_dev_t *hw, bool en)
|
||||
static inline void sdmmc_ll_enable_bus_clock(int group_id, bool en)
|
||||
{
|
||||
(void)group_id;
|
||||
if (en) {
|
||||
DPORT_SET_PERI_REG_MASK(DPORT_WIFI_CLK_EN_REG, DPORT_WIFI_CLK_SDIO_HOST_EN);
|
||||
} else {
|
||||
@@ -121,10 +121,11 @@ static inline void sdmmc_ll_enable_bus_clock(sdmmc_dev_t *hw, bool en)
|
||||
/**
|
||||
* @brief Reset the SDMMC module
|
||||
*
|
||||
* @param hw hardware instance address
|
||||
* @param group_id Group ID
|
||||
*/
|
||||
static inline void sdmmc_ll_reset_register(sdmmc_dev_t *hw)
|
||||
static inline void sdmmc_ll_reset_register(int group_id)
|
||||
{
|
||||
(void)group_id;
|
||||
DPORT_SET_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, DPORT_SDIO_HOST_RST);
|
||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_CORE_RST_EN_REG, DPORT_SDIO_HOST_RST);
|
||||
}
|
||||
@@ -256,10 +257,8 @@ static inline uint32_t sdmmc_ll_get_card_clock_div(sdmmc_dev_t *hw, uint32_t slo
|
||||
uint32_t card_div = 0;
|
||||
|
||||
if (slot == 0) {
|
||||
HAL_ASSERT(hw->clksrc.card0 == 0);
|
||||
card_div = HAL_FORCE_READ_U32_REG_FIELD(hw->clkdiv, div0);
|
||||
} else if (slot == 1) {
|
||||
HAL_ASSERT(hw->clksrc.card1 == 1);
|
||||
card_div = HAL_FORCE_READ_U32_REG_FIELD(hw->clkdiv, div1);
|
||||
} else {
|
||||
HAL_ASSERT(false);
|
||||
|
Reference in New Issue
Block a user