2022-04-08 14:42:47 +00:00
|
|
|
/*
|
2022-08-23 15:05:58 +00:00
|
|
|
* Copyright 2020-2022 NXP
|
2022-04-08 14:42:47 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SDMMC_CONFIG_H_
|
|
|
|
#define _SDMMC_CONFIG_H_
|
|
|
|
|
2024-04-12 13:21:49 +00:00
|
|
|
#include "fsl_common.h"
|
|
|
|
|
2022-04-08 14:42:47 +00:00
|
|
|
#ifdef SD_ENABLED
|
|
|
|
#include "fsl_sd.h"
|
|
|
|
#endif
|
|
|
|
#ifdef MMC_ENABLED
|
|
|
|
#include "fsl_mmc.h"
|
|
|
|
#endif
|
|
|
|
#include "clock_config.h"
|
|
|
|
#include "fsl_sdmmc_host.h"
|
|
|
|
#include "fsl_sdmmc_common.h"
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* Definitions
|
|
|
|
******************************************************************************/
|
|
|
|
/* @brief host basic configuration */
|
|
|
|
#define BOARD_SDMMC_SD_HOST_BASEADDR SDIF
|
|
|
|
#define BOARD_SDMMC_SD_HOST_IRQ SDIO_IRQn
|
|
|
|
|
|
|
|
/* @brief card detect configuration */
|
|
|
|
#define BOARD_SDMMC_SD_CD_TYPE kSD_DetectCardByHostCD
|
|
|
|
#define BOARD_SDMMC_SD_CARD_DETECT_DEBOUNCE_DELAY_MS (100U)
|
|
|
|
|
|
|
|
#define BOARD_SDMMC_DATA_BUFFER_ALIGN_SIZE (4U)
|
|
|
|
|
|
|
|
/*!@ brief host interrupt priority*/
|
|
|
|
#define BOARD_SDMMC_SD_HOST_IRQ_PRIORITY (5U)
|
|
|
|
#define BOARD_SDMMC_MMC_HOST_IRQ_PRIORITY (5U)
|
|
|
|
/*!@brief dma descriptor buffer size */
|
|
|
|
#define BOARD_SDMMC_HOST_DMA_DESCRIPTOR_BUFFER_SIZE (0x40U)
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* API
|
|
|
|
******************************************************************************/
|
|
|
|
/*!
|
|
|
|
* @brief BOARD SD configurations.
|
|
|
|
* @param card card descriptor
|
|
|
|
* @param cd card detect callback
|
|
|
|
* @param userData user data for callback
|
|
|
|
*/
|
|
|
|
#ifdef SD_ENABLED
|
|
|
|
void BOARD_SD_Config(void *card, sd_cd_t cd, uint32_t hostIRQPriority, void *userData);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* _BOARD_H_ */
|