Kconfig: Simplify the conditional default statement

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-07-16 01:21:32 +08:00 committed by archer
parent d46dce5819
commit 8083b094c3
10 changed files with 15 additions and 30 deletions

View File

@ -148,8 +148,7 @@ endif # EXAMPLES_FOC_SENSORED
config EXAMPLES_FOC_HAVE_OPENLOOP
bool "FOC example have open-loop controller"
select INDUSTRY_FOC_ANGLE_OPENLOOP
default y if EXAMPLES_FOC_SENSORLESS
default n
default EXAMPLES_FOC_SENSORLESS
config EXAMPLES_FOC_HAVE_TORQ
bool "FOC example torque controller support"
@ -157,8 +156,7 @@ config EXAMPLES_FOC_HAVE_TORQ
config EXAMPLES_FOC_HAVE_VEL
bool "FOC example velocity controller support"
default y if EXAMPLES_FOC_SENSORLESS
default n
default EXAMPLES_FOC_SENSORLESS
config EXAMPLES_FOC_HAVE_POS
bool "FOC example position controller support"
@ -414,8 +412,7 @@ endmenu # FOC controller parameters
config EXAMPLES_FOC_HAVE_RUN
bool
default y if !EXAMPLES_FOC_RUN_DISABLE
default n
default !EXAMPLES_FOC_RUN_DISABLE
config EXAMPLES_FOC_RUN_DISABLE
bool "FOC Disable FOC motor controller"

View File

@ -29,8 +29,7 @@ config EXAMPLES_MLD_STACKSIZE
config EXAMPLES_MLD_INIT
bool "Initialize network"
default n if NSH_NETINIT
default y if !NSH_NETINIT
default !NSH_NETINIT
---help---
Include logic to initialize the network. This should not be done if
the network is already initialized when nettest runs. This is

View File

@ -129,8 +129,7 @@ endchoice # IP Domain
config EXAMPLES_NETTEST_INIT
bool "Initialize network"
default n if NSH_NETINIT
default y if !NSH_NETINIT
default !NSH_NETINIT
depends on !EXAMPLES_NETTEST_LOOPBACK
---help---
Include logic to initialize the network. This should not be done if

View File

@ -146,8 +146,7 @@ endchoice # IP Domain
config EXAMPLES_TCPBLASTER_INIT
bool "Initialize network"
default n if NSH_NETINIT
default y if !NSH_NETINIT
default !NSH_NETINIT
depends on !EXAMPLES_TCPBLASTER_LOOPBACK
---help---
Include logic to initialize the network. This should not be done if

View File

@ -70,8 +70,7 @@ config EXAMPLES_UDP_DEVNAME
config EXAMPLES_UDP_NETINIT
bool "Initialize network"
default n if NSH_NETINIT
default y if !NSH_NETINIT
default !NSH_NETINIT
---help---
Selecting this option will enable logic in the example to perform
some basic initialization of the network. You would probably only

View File

@ -57,8 +57,7 @@ endchoice # IP Domain
config EXAMPLES_UDPBLASTER_INIT
bool "Initialize network"
default n if NSH_NETINIT
default y if !NSH_NETINIT
default !NSH_NETINIT
depends on !EXAMPLES_UDPBLASTER_LOOPBACK
---help---
Include logic to initialize the network. This should not be done if

View File

@ -18,8 +18,7 @@ menu "NX Server/Device Configuration"
config NXWIDGETS_FLICKERFREE
bool "Enable Flicker Reduction Logic"
default y if NX_LCDDRIVER
default n if !NX_LCDDRIVER
default NX_LCDDRIVER
---help---
Because of their performance an in the manner in which they are
updated, LCDs may be prone to "flicker" in the displays when Widgets

View File

@ -124,8 +124,7 @@ comment "Background Image"
config NXWM_DISABLE_BACKGROUND_IMAGE
bool "Disable Background Image"
default n if !NXWM_DISABLE_MINIMIZE
default y if NXWM_DISABLE_MINIMIZE
default NXWM_DISABLE_MINIMIZE
---help---
Disable support for the "Desktop" background image.
@ -465,8 +464,7 @@ menu "NxWM Touchscreen Configuration"
config NXWM_TOUCHSCREEN
bool "Touchscreen Support"
default y if INPUT
default n if !INPUT
default INPUT
---help---
Define to build in touchscreen support.

View File

@ -16,8 +16,7 @@ if NETUTILS_WEBSERVER
config NETUTILS_HTTPD_SINGLECONNECT
bool "Single Connection"
default n if !DISABLE_PTHREAD
default y if DISABLE_PTHREAD
default DISABLE_PTHREAD
---help---
By default, the uIP web server will create a new, independent thread
for each connection. This can, however, use a lot of stack space
@ -28,15 +27,13 @@ config NETUTILS_HTTPD_SINGLECONNECT
config NETUTILS_HTTPD_SCRIPT_DISABLE
bool "Disable %! scripting"
default y if NETUTILS_HTTPD_SENDFILE
default n if !NETUTILS_HTTPD_SENDFILE
default NETUTILS_HTTPD_SENDFILE
---help---
This option, if selected, will elide the %! scripting
config NETUTILS_HTTPD_ENABLE_CHUNKED_ENCODING
bool "Enable HTTP chunked encoding"
default y if !NETUTILS_HTTPD_SCRIPT_DISABLE
default n if NETUTILS_HTTPD_SCRIPT_DISABLE
default !NETUTILS_HTTPD_SCRIPT_DISABLE
---help---
This option, if selected, will cause transmissions of blocks of
initially unknown size (e.g. dynamic content creation) to be sent

View File

@ -650,8 +650,7 @@ config NSH_DISABLE_XD
config NSH_DISABLE_RESET_CAUSE
bool "Disable reset cause"
default n if !DEFAULT_SMALL
default y if DEFAULT_SMALL
default DEFAULT_SMALL
depends on BOARDCTL_RESET_CAUSE
endmenu