drivers/periph_common: remove redundant entry
- Use same file for MODULE inclusion and configuration - Fix guard - Add Kconfig.wdt
This commit is contained in:
parent
86ea4b42e4
commit
4648329c66
@ -4,37 +4,7 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
menuconfig KCONFIG_USEMODULE_PERIPH_TIMER
|
if TEST_KCONFIG
|
||||||
bool "Configure timer peripheral"
|
|
||||||
depends on USEMODULE_PERIPH_TIMER
|
|
||||||
help
|
|
||||||
Configure Timer peripheral using Kconfig.
|
|
||||||
|
|
||||||
orsource "$(RIOTCPU)/$(CPU)/periph/Kconfig"
|
|
||||||
|
|
||||||
menuconfig KCONFIG_USEMODULE_PERIPH_WDT
|
|
||||||
bool "Configure Watchdog peripheral"
|
|
||||||
depends on USEMODULE_PERIPH_WDT
|
|
||||||
help
|
|
||||||
Configure Watchdog peripheral using Kconfig.
|
|
||||||
|
|
||||||
if KCONFIG_USEMODULE_PERIPH_WDT
|
|
||||||
|
|
||||||
config WDT_WARNING_PERIOD
|
|
||||||
int "Warning period (in ms)"
|
|
||||||
depends on HAS_PERIPH_WDT_WARNING_PERIOD
|
|
||||||
help
|
|
||||||
Period in ms before reboot where wdt_cb() is executed.
|
|
||||||
|
|
||||||
endif # KCONFIG_USEMODULE_PERIPH_WDT
|
|
||||||
|
|
||||||
config HAS_PERIPH_WDT_WARNING_PERIOD
|
|
||||||
bool
|
|
||||||
help
|
|
||||||
Indicates that a CPU provides a warning period configuration option.
|
|
||||||
|
|
||||||
menu "Peripheral drivers"
|
|
||||||
depends on TEST_KCONFIG
|
|
||||||
|
|
||||||
config MODULE_PERIPH_COMMON
|
config MODULE_PERIPH_COMMON
|
||||||
bool
|
bool
|
||||||
@ -167,8 +137,6 @@ config MODULE_PERIPH_INIT_RTT
|
|||||||
|
|
||||||
rsource "Kconfig.spi"
|
rsource "Kconfig.spi"
|
||||||
|
|
||||||
rsource "Kconfig.timer"
|
|
||||||
|
|
||||||
rsource "Kconfig.uart"
|
rsource "Kconfig.uart"
|
||||||
|
|
||||||
config MODULE_PERIPH_USBDEV
|
config MODULE_PERIPH_USBDEV
|
||||||
@ -181,14 +149,7 @@ config MODULE_PERIPH_INIT_USBDEV
|
|||||||
default y if MODULE_PERIPH_INIT
|
default y if MODULE_PERIPH_INIT
|
||||||
depends on MODULE_PERIPH_USBDEV
|
depends on MODULE_PERIPH_USBDEV
|
||||||
|
|
||||||
menuconfig MODULE_PERIPH_WDT
|
endif # TEST_KCONFIG
|
||||||
bool "Watchdog Timer peripheral driver"
|
|
||||||
depends on HAS_PERIPH_WDT
|
|
||||||
select MODULE_PERIPH_COMMON
|
|
||||||
|
|
||||||
config MODULE_PERIPH_INIT_WDT
|
rsource "Kconfig.timer"
|
||||||
bool "Auto initialize the Watchdog Timer peripheral"
|
rsource "Kconfig.wdt"
|
||||||
default y if MODULE_PERIPH_INIT
|
|
||||||
depends on MODULE_PERIPH_WDT
|
|
||||||
|
|
||||||
endmenu # Peripheral drivers
|
|
||||||
|
|||||||
@ -3,10 +3,11 @@
|
|||||||
# This file is subject to the terms and conditions of the GNU Lesser
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
#
|
|
||||||
|
if TEST_KCONFIG
|
||||||
|
|
||||||
menuconfig MODULE_PERIPH_TIMER
|
menuconfig MODULE_PERIPH_TIMER
|
||||||
bool "Timer peripheral driver"
|
bool "Configure timer peripheral driver"
|
||||||
depends on HAS_PERIPH_TIMER
|
depends on HAS_PERIPH_TIMER
|
||||||
select MODULE_PERIPH_COMMON
|
select MODULE_PERIPH_COMMON
|
||||||
|
|
||||||
@ -30,3 +31,16 @@ config MODULE_PERIPH_INIT_TIMER_PERIODIC
|
|||||||
default y if MODULE_PERIPH_INIT
|
default y if MODULE_PERIPH_INIT
|
||||||
|
|
||||||
endif # MODULE_PERIPH_TIMER
|
endif # MODULE_PERIPH_TIMER
|
||||||
|
|
||||||
|
endif # TEST_KCONFIG
|
||||||
|
|
||||||
|
menuconfig KCONFIG_USEMODULE_PERIPH_TIMER
|
||||||
|
bool "Configure timer peripheral driver"
|
||||||
|
depends on USEMODULE_PERIPH_TIMER
|
||||||
|
help
|
||||||
|
Configure Timer peripheral using Kconfig.
|
||||||
|
|
||||||
|
# Include CPU specific configurations
|
||||||
|
if KCONFIG_USEMODULE_PERIPH_TIMER
|
||||||
|
osource "$(RIOTCPU)/$(CPU)/periph/Kconfig.timer"
|
||||||
|
endif
|
||||||
|
|||||||
40
drivers/periph_common/Kconfig.wdt
Normal file
40
drivers/periph_common/Kconfig.wdt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Copyright (c) 2020 HAW Hamburg
|
||||||
|
#
|
||||||
|
# This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
# directory for more details.
|
||||||
|
|
||||||
|
if TEST_KCONFIG
|
||||||
|
|
||||||
|
menuconfig MODULE_PERIPH_WDT
|
||||||
|
bool "Watchdog Timer peripheral driver"
|
||||||
|
depends on HAS_PERIPH_WDT
|
||||||
|
select MODULE_PERIPH_COMMON
|
||||||
|
|
||||||
|
config MODULE_PERIPH_INIT_WDT
|
||||||
|
bool "Auto initialize the Watchdog Timer peripheral"
|
||||||
|
default y if MODULE_PERIPH_INIT
|
||||||
|
depends on MODULE_PERIPH_WDT
|
||||||
|
|
||||||
|
endif # TEST_KCONFIG
|
||||||
|
|
||||||
|
menuconfig KCONFIG_USEMODULE_PERIPH_WDT
|
||||||
|
bool "Configure Watchdog peripheral"
|
||||||
|
depends on USEMODULE_PERIPH_WDT
|
||||||
|
help
|
||||||
|
Configure Watchdog peripheral using Kconfig.
|
||||||
|
|
||||||
|
if KCONFIG_USEMODULE_PERIPH_WDT
|
||||||
|
|
||||||
|
config WDT_WARNING_PERIOD
|
||||||
|
int "Warning period (in ms)"
|
||||||
|
depends on HAS_PERIPH_WDT_WARNING_PERIOD
|
||||||
|
help
|
||||||
|
Period in ms before reboot where wdt_cb() is executed.
|
||||||
|
|
||||||
|
endif # KCONFIG_USEMODULE_PERIPH_WDT
|
||||||
|
|
||||||
|
config HAS_PERIPH_WDT_WARNING_PERIOD
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Indicates that a CPU provides a warning period configuration option.
|
||||||
Loading…
x
Reference in New Issue
Block a user