From 6007a318130bf52a687bb42404601c7b830690c4 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Thu, 10 Sep 2020 21:59:40 +0200 Subject: [PATCH] sam0: Add periph_gpio_fast_read feature where applicable --- cpu/samd21/Kconfig | 1 + cpu/samd21/Makefile.features | 1 + cpu/saml1x/Kconfig | 1 + cpu/saml1x/Makefile.features | 1 + cpu/saml21/Kconfig | 1 + cpu/saml21/Makefile.features | 2 ++ kconfigs/Kconfig.features | 7 +++++++ 7 files changed, 14 insertions(+) diff --git a/cpu/samd21/Kconfig b/cpu/samd21/Kconfig index e61337f2f5..0b7dfa18a4 100644 --- a/cpu/samd21/Kconfig +++ b/cpu/samd21/Kconfig @@ -10,6 +10,7 @@ config CPU_FAM_SAMD21 select CPU_COMMON_SAM0 select CPU_CORE_CORTEX_M0PLUS select HAS_CPU_SAMD21 + select HAS_PERIPH_GPIO_FAST_READ select HAS_PUF_SRAM ## CPU Models diff --git a/cpu/samd21/Makefile.features b/cpu/samd21/Makefile.features index 0f283eb987..10d35a9472 100644 --- a/cpu/samd21/Makefile.features +++ b/cpu/samd21/Makefile.features @@ -2,5 +2,6 @@ CPU_CORE = cortex-m0plus CPU_FAM = samd21 FEATURES_PROVIDED += puf_sram +FEATURES_PROVIDED += periph_gpio_fast_read -include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/saml1x/Kconfig b/cpu/saml1x/Kconfig index 0ca51908ba..ee5b1a954a 100644 --- a/cpu/saml1x/Kconfig +++ b/cpu/saml1x/Kconfig @@ -11,6 +11,7 @@ config CPU_COMMON_SAML1X select CPU_CORE_CORTEX_M23 select HAS_CORTEXM_MPU select HAS_CPU_SAML1X + select HAS_PERIPH_GPIO_FAST_READ select HAS_PERIPH_HWRNG config CPU_FAM_SAML10 diff --git a/cpu/saml1x/Makefile.features b/cpu/saml1x/Makefile.features index 2b005dda64..4f0bf86c65 100644 --- a/cpu/saml1x/Makefile.features +++ b/cpu/saml1x/Makefile.features @@ -10,5 +10,6 @@ endif FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_hwrng +FEATURES_PROVIDED += periph_gpio_fast_read include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/saml21/Kconfig b/cpu/saml21/Kconfig index e1e694b266..09c0ea649a 100644 --- a/cpu/saml21/Kconfig +++ b/cpu/saml21/Kconfig @@ -11,6 +11,7 @@ config CPU_FAM_SAML21 select CPU_CORE_CORTEX_M0PLUS select HAS_BACKUP_RAM select HAS_CPU_SAML21 + select HAS_PERIPH_GPIO_FAST_READ ## CPU Models config CPU_MODEL_SAML21J18A diff --git a/cpu/saml21/Makefile.features b/cpu/saml21/Makefile.features index 3e4b0d6fa8..7232f9200b 100644 --- a/cpu/saml21/Makefile.features +++ b/cpu/saml21/Makefile.features @@ -4,6 +4,8 @@ CPU_FAM = saml21 # The SAMR30 line of MCUs does not contain a TRNG CPU_MODELS_WITHOUT_HWRNG += samr30% +FEATURES_PROVIDED += periph_gpio_fast_read + # Low Power SRAM is *not* retained during Backup Sleep. # It therefore does not fulfill the requirements of the 'backup_ram' interface. # It can still be used in normal and standby mode, but code that relies on it diff --git a/kconfigs/Kconfig.features b/kconfigs/Kconfig.features index c621830b66..3544bda751 100644 --- a/kconfigs/Kconfig.features +++ b/kconfigs/Kconfig.features @@ -143,6 +143,13 @@ config HAS_PERIPH_GPIO_IRQ Indicates that the GPIO peripheral supports external interrupts is present. +config HAS_PERIPH_GPIO_FAST_READ + bool + help + Indicates that the GPIO peripheral supports a mode in which pin read + operations are faster, usually with a tradeoff against a different + property. + config HAS_PERIPH_HWRNG bool help