mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/sam54-xpro: enable SDMMC support
This commit is contained in:
parent
6ab9277234
commit
4cda0e41cb
@ -18,6 +18,7 @@ config BOARD_SAME54_XPRO
|
|||||||
select HAS_PERIPH_RTC
|
select HAS_PERIPH_RTC
|
||||||
select HAS_PERIPH_RTT
|
select HAS_PERIPH_RTT
|
||||||
select HAS_PERIPH_PWM
|
select HAS_PERIPH_PWM
|
||||||
|
select HAS_PERIPH_SDMMC
|
||||||
select HAS_PERIPH_SPI
|
select HAS_PERIPH_SPI
|
||||||
select HAS_PERIPH_TIMER
|
select HAS_PERIPH_TIMER
|
||||||
select HAS_PERIPH_UART
|
select HAS_PERIPH_UART
|
||||||
@ -31,6 +32,7 @@ config BOARD_SAME54_XPRO
|
|||||||
select HAVE_SAM0_ETH
|
select HAVE_SAM0_ETH
|
||||||
select HAVE_SAM0_SDHC
|
select HAVE_SAM0_SDHC
|
||||||
select HAVE_MTD_AT24CXXX
|
select HAVE_MTD_AT24CXXX
|
||||||
|
select HAVE_MTD_SDMMC_DEFAULT
|
||||||
|
|
||||||
# This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR
|
# This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR
|
||||||
select MODULE_PERIPH_SPI_ON_QSPI if MODULE_MTD_SPI_NOR
|
select MODULE_PERIPH_SPI_ON_QSPI if MODULE_MTD_SPI_NOR
|
||||||
|
@ -10,7 +10,11 @@ ifneq (,$(filter mtd,$(USEMODULE)))
|
|||||||
FEATURES_REQUIRED += periph_spi_on_qspi
|
FEATURES_REQUIRED += periph_spi_on_qspi
|
||||||
USEMODULE += mtd_spi_nor
|
USEMODULE += mtd_spi_nor
|
||||||
USEMODULE += mtd_at24cxxx at24mac
|
USEMODULE += mtd_at24cxxx at24mac
|
||||||
USEMODULE += sam0_sdhc
|
ifeq (,$(filter sam0_sdhc,$(USEMODULE)))
|
||||||
|
# during a transition period it is possible to use the `sam0_sdhc` MTD
|
||||||
|
# driver instead of the SD/MMC MTD driver
|
||||||
|
USEMODULE += mtd_sdmmc_default
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# enables sam0_eth as default network device
|
# enables sam0_eth as default network device
|
||||||
|
@ -8,6 +8,7 @@ FEATURES_PROVIDED += periph_i2c
|
|||||||
FEATURES_PROVIDED += periph_rtc
|
FEATURES_PROVIDED += periph_rtc
|
||||||
FEATURES_PROVIDED += periph_rtt
|
FEATURES_PROVIDED += periph_rtt
|
||||||
FEATURES_PROVIDED += periph_pwm
|
FEATURES_PROVIDED += periph_pwm
|
||||||
|
FEATURES_PROVIDED += periph_sdmmc
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
@ -76,6 +76,8 @@ extern mtd_dev_t *mtd0, *mtd1, *mtd2;
|
|||||||
#define MTD_1 mtd1
|
#define MTD_1 mtd1
|
||||||
#define MTD_2 mtd2
|
#define MTD_2 mtd2
|
||||||
#define MTD_NUMOF 3
|
#define MTD_NUMOF 3
|
||||||
|
|
||||||
|
#define CONFIG_SDMMC_GENERIC_MTD_OFFSET 2 /**< mtd2 is used for SD Card */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -369,6 +369,18 @@ static const adc_conf_chan_t adc_channels[] = {
|
|||||||
*/
|
*/
|
||||||
#define SDHC_DEV SDHC1 /**< The SDHC instance to use */
|
#define SDHC_DEV SDHC1 /**< The SDHC instance to use */
|
||||||
#define SDHC_DEV_ISR isr_sdhc1 /**< Interrupt service routing for SDHC1 */
|
#define SDHC_DEV_ISR isr_sdhc1 /**< Interrupt service routing for SDHC1 */
|
||||||
|
|
||||||
|
/** SDHC devices */
|
||||||
|
static const sdhc_conf_t sdhc_config[] = {
|
||||||
|
{
|
||||||
|
.sdhc = SDHC1,
|
||||||
|
.cd = GPIO_PIN(PD, 20),
|
||||||
|
.wp = GPIO_UNDEF,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Number of configured SDHC devices */
|
||||||
|
#define SDHC_CONFIG_NUMOF 1
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user