1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

periph/gpio: Model TAMPER_WAKE for kconfig

This commit is contained in:
MrKevinWeiss 2021-11-24 11:22:25 +01:00
parent f98128f0fb
commit fba9cad987
No known key found for this signature in database
GPG Key ID: 3514539D7808D123
3 changed files with 16 additions and 2 deletions

View File

@ -18,7 +18,7 @@ config MODULE_SAM0_COMMON_PERIPH
config MODULE_PERIPH_RTC_RTT
bool
default y if MODULE_PERIPH_RTT || MODULE_PERIPH_RTC
default y if MODULE_PERIPH_RTT || MODULE_PERIPH_RTC || MODULE_PERIPH_GPIO_TAMPER_WAKE
config MODULE_PERIPH_UART_NONBLOCKING
depends on HAS_PERIPH_UART_NONBLOCKING

View File

@ -29,7 +29,15 @@ config MODULE_PERIPH_GPIO_FAST_READ
This trades an increase in power consumption for a decrease in GPIO pin
read latency.
# TODO: this module is actually just an artifact from the way periph_init_%
config MODULE_PERIPH_GPIO_TAMPER_WAKE
bool "enable wake from Deep Sleep by RTC tamper pins"
depends on HAS_PERIPH_GPIO_TAMPER_WAKE
help
If you enable this, a RTC tamper pin that has been configured as an
interrupt can wake the CPU from Deep Sleep. Only RTC tamper pins
(and the RTC alarm) can wake the CPU from Deep Sleep.
# TODO: this module is actually jus t an artifact from the way periph_init_%
# modules are handled in Makefile. We need to define it to keep the list the
# same for now. We should be able to remove it later on.
@ -43,6 +51,11 @@ config MODULE_PERIPH_INIT_GPIO_FAST_READ
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_GPIO_FAST_READ
config MODULE_PERIPH_INIT_GPIO_TAMPER_WAKE
bool "Auto initialize tamper detection"
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_GPIO_TAMPER_WAKE
endif # MODULE_PERIPH_GPIO
osource "$(RIOTCPU)/$(CPU)/periph/Kconfig.gpio"

View File

@ -10,4 +10,5 @@ config APPLICATION
default y
imply MODULE_PERIPH_GPIO_IRQ
imply MODULE_PERIPH_GPIO_FAST_READ
imply MODULE_PERIPH_GPIO_TAMPER_WAKE
depends on TEST_KCONFIG