mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/sam0_common: add SDMMC support
This commit is contained in:
parent
33d1e82b73
commit
6ab9277234
@ -17,6 +17,10 @@ config CPU_COMMON_SAM0
|
||||
select HAS_PERIPH_I2C_RECONFIGURE
|
||||
select HAS_PERIPH_RTT_SET_COUNTER
|
||||
select HAS_PERIPH_RTT_OVERFLOW
|
||||
select HAS_PERIPH_SDMMC_AUTO_CMD12
|
||||
select HAS_PERIPH_SDMMC_HS
|
||||
select HAS_PERIPH_SDMMC_MMC
|
||||
select HAS_PERIPH_SDMMC_SDHC
|
||||
select HAS_PERIPH_SPI_RECONFIGURE
|
||||
select HAS_PERIPH_SPI_GPIO_MODE
|
||||
select HAS_PERIPH_TIMER_PERIODIC
|
||||
|
@ -10,6 +10,10 @@ ifneq (,$(filter periph_spi,$(USEMODULE)))
|
||||
USEMODULE += periph_spi_gpio_mode
|
||||
endif
|
||||
|
||||
ifneq (,$(filter periph_sdmmc,$(USEMODULE)))
|
||||
USEMODULE += sdmmc_sdhc
|
||||
endif
|
||||
|
||||
# include sam0 common periph drivers
|
||||
USEMODULE += sam0_common_periph
|
||||
|
||||
|
@ -15,6 +15,10 @@ FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
||||
FEATURES_PROVIDED += periph_i2c_reconfigure
|
||||
FEATURES_PROVIDED += periph_rtt_set_counter
|
||||
FEATURES_PROVIDED += periph_rtt_overflow
|
||||
FEATURES_PROVIDED += periph_sdmmc_auto_cmd12
|
||||
FEATURES_PROVIDED += periph_sdmmc_hs
|
||||
FEATURES_PROVIDED += periph_sdmmc_mmc
|
||||
FEATURES_PROVIDED += periph_sdmmc_sdhc
|
||||
FEATURES_PROVIDED += periph_spi_reconfigure
|
||||
FEATURES_PROVIDED += periph_spi_gpio_mode
|
||||
FEATURES_PROVIDED += periph_timer_periodic # implements timer_set_periodic()
|
||||
|
@ -907,6 +907,25 @@ typedef struct {
|
||||
} sam0_common_usb_config_t;
|
||||
#endif /* USB_INST_NUM */
|
||||
|
||||
/**
|
||||
* @brief SDIO/SDMMC buffer alignment for SDHC because of DMA/FIFO buffer restrictions
|
||||
*/
|
||||
#define SDMMC_CPU_DMA_ALIGNMENT 4
|
||||
|
||||
/**
|
||||
* @brief SDIO/SDMMC buffer instantiation requirement for SDHC
|
||||
*/
|
||||
#define SDMMC_CPU_DMA_REQUIREMENTS __attribute__((aligned(SDMMC_CPU_DMA_ALIGNMENT)))
|
||||
|
||||
/**
|
||||
* @brief SDHC peripheral configuration
|
||||
*/
|
||||
typedef struct {
|
||||
void *sdhc; /**< SDHC peripheral */
|
||||
gpio_t cd; /**< Card Detect pin (must be GPIO_UNDEF if not connected) */
|
||||
gpio_t wp; /**< Write Protect pin (must be GPIO_UNDEF if not connected) */
|
||||
} sdhc_conf_t;
|
||||
|
||||
/**
|
||||
* @name WDT upper and lower bound times in ms
|
||||
* @{
|
||||
|
@ -11,6 +11,9 @@
|
||||
* @ingroup cpu_sam0_common
|
||||
* @brief SD card interface functions for sam0 class devices
|
||||
*
|
||||
* @warning This driver is deprecated. Use the `sdmmc` driver module
|
||||
* instead. You can refer to the `same54-xpro´ board as an example
|
||||
* on how to use it.
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
|
Loading…
Reference in New Issue
Block a user