Kconfig: Replace WANT_GPIO_BITBANGING with individual options

Support setting individual options instead of one global option (
WANT_BUTTONS, WANT_TMCUART, WANT_NEOPIXEL, WANT_PULSE_COUNTER,
WANT_HX71X).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2025-04-06 12:36:41 -04:00
parent efc2d9b364
commit c3c64adc32
5 changed files with 40 additions and 10 deletions

View file

@ -88,7 +88,19 @@ config USB_SERIAL_NUMBER
endmenu
# Optional features that can be disabled (for devices with small flash sizes)
config WANT_GPIO_BITBANGING
config WANT_BUTTONS
bool
depends on HAVE_GPIO
default y
config WANT_TMCUART
bool
depends on HAVE_GPIO
default y
config WANT_NEOPIXEL
bool
depends on HAVE_GPIO
default y
config WANT_PULSE_COUNTER
bool
depends on HAVE_GPIO
default y
@ -118,7 +130,7 @@ config WANT_ICM20948
default y
config WANT_HX71X
bool
depends on WANT_GPIO_BITBANGING
depends on HAVE_GPIO
default y
config WANT_ADS1220
bool
@ -147,8 +159,17 @@ config NEED_SENSOR_BULK
default y
menu "Optional features (to reduce code size)"
depends on HAVE_LIMITED_CODE_SIZE
config WANT_GPIO_BITBANGING
bool "Support GPIO \"bit-banging\" devices"
config WANT_BUTTONS
bool "Support GPIO based button reading"
depends on HAVE_GPIO
config WANT_TMCUART
bool "Support Trinamic stepper motor driver UART communication"
depends on HAVE_GPIO
config WANT_NEOPIXEL
bool "Support 'neopixel' type LED control"
depends on HAVE_GPIO
config WANT_PULSE_COUNTER
bool "Support measuring fan tachometer GPIO pins"
depends on HAVE_GPIO
config WANT_DISPLAYS
bool "Support LCD devices"
@ -170,7 +191,7 @@ config WANT_ICM20948
depends on HAVE_GPIO_I2C
config WANT_HX71X
bool "Support HX711 and HX717 ADC chips"
depends on WANT_GPIO_BITBANGING
depends on HAVE_GPIO
config WANT_ADS1220
bool "Support ADS 1220 ADC chip"
depends on HAVE_GPIO_SPI

View file

@ -9,8 +9,10 @@ src-$(CONFIG_HAVE_GPIO_SDIO) += sdiocmds.c
src-$(CONFIG_HAVE_GPIO_I2C) += i2ccmds.c
src-$(CONFIG_HAVE_GPIO_HARD_PWM) += pwmcmds.c
src-$(CONFIG_WANT_GPIO_BITBANGING) += buttons.c tmcuart.c neopixel.c \
pulse_counter.c
src-$(CONFIG_WANT_BUTTONS) += buttons.c
src-$(CONFIG_WANT_TMCUART) += tmcuart.c
src-$(CONFIG_WANT_NEOPIXEL) += neopixel.c
src-$(CONFIG_WANT_PULSE_COUNTER) += pulse_counter.c
src-$(CONFIG_WANT_DISPLAYS) += lcd_st7920.c lcd_hd44780.c
src-$(CONFIG_WANT_SOFTWARE_SPI) += spi_software.c
src-$(CONFIG_WANT_SOFTWARE_I2C) += i2c_software.c

View file

@ -2,7 +2,6 @@
CONFIG_MACH_AVR=y
CONFIG_MACH_atmega328=y
CONFIG_CLOCK_FREQ=16000000
CONFIG_WANT_GPIO_BITBANGING=n
CONFIG_WANT_DISPLAYS=n
CONFIG_WANT_SOFTWARE_SPI=n
CONFIG_WANT_SOFTWARE_I2C=n

View file

@ -1,4 +1,8 @@
# Base config file for the Beaglebone PRU
CONFIG_MACH_PRU=y
CONFIG_WANT_GPIO_BITBANGING=n
CONFIG_WANT_BUTTONS=n
CONFIG_WANT_TMCUART=n
CONFIG_WANT_NEOPIXEL=n
CONFIG_WANT_PULSE_COUNTER=n
CONFIG_WANT_HX71X=n
CONFIG_WANT_DISPLAYS=n

View file

@ -5,5 +5,9 @@ CONFIG_LOW_LEVEL_OPTIONS=y
CONFIG_STM32_SERIAL_USART2_ALT_PA15_PA14=y
CONFIG_STM32_CLOCK_REF_INTERNAL=y
CONFIG_STM32_FLASH_START_0000=y
CONFIG_WANT_BUTTONS=n
CONFIG_WANT_TMCUART=n
CONFIG_WANT_NEOPIXEL=n
CONFIG_WANT_PULSE_COUNTER=n
CONFIG_WANT_HX71X=n
CONFIG_WANT_DISPLAYS=n
CONFIG_WANT_GPIO_BITBANGING=n