Kconfig: Support selecting optional features on chips with small flash size
Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select optional features. This symbol is enabled on chips with small build sizes. Replace the HAVE_GPIO_BITBANGING with four new symbols: WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI, and WANT_SOFTWARE_I2C. This allows users a little more flexibility when selecting features they need. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
44
src/Kconfig
44
src/Kconfig
@@ -87,6 +87,46 @@ config USB_SERIAL_NUMBER
|
||||
string "USB serial number" if !USB_SERIAL_NUMBER_CHIPID
|
||||
endmenu
|
||||
|
||||
# Optional features that can be disabled (for devices with small flash sizes)
|
||||
config WANT_GPIO_BITBANGING
|
||||
bool
|
||||
depends on HAVE_GPIO
|
||||
default y
|
||||
config WANT_DISPLAYS
|
||||
bool
|
||||
depends on HAVE_GPIO
|
||||
default y
|
||||
config WANT_SENSORS
|
||||
bool
|
||||
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
|
||||
default y
|
||||
config WANT_SOFTWARE_I2C
|
||||
bool
|
||||
depends on HAVE_GPIO && HAVE_GPIO_I2C
|
||||
default y
|
||||
config WANT_SOFTWARE_SPI
|
||||
bool
|
||||
depends on HAVE_GPIO && HAVE_GPIO_SPI
|
||||
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"
|
||||
depends on HAVE_GPIO
|
||||
config WANT_DISPLAYS
|
||||
bool "Support LCD devices"
|
||||
depends on HAVE_GPIO
|
||||
config WANT_SENSORS
|
||||
bool "Support external sensor devices"
|
||||
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
|
||||
config WANT_SOFTWARE_I2C
|
||||
bool "Support software based I2C \"bit-banging\""
|
||||
depends on HAVE_GPIO && HAVE_GPIO_I2C
|
||||
config WANT_SOFTWARE_SPI
|
||||
bool "Support software based SPI \"bit-banging\""
|
||||
depends on HAVE_GPIO && HAVE_GPIO_SPI
|
||||
endmenu
|
||||
|
||||
# Generic configuration options for CANbus
|
||||
config CANSERIAL
|
||||
bool
|
||||
@@ -124,8 +164,6 @@ config HAVE_GPIO_I2C
|
||||
bool
|
||||
config HAVE_GPIO_HARD_PWM
|
||||
bool
|
||||
config HAVE_GPIO_BITBANGING
|
||||
bool
|
||||
config HAVE_STRICT_TIMING
|
||||
bool
|
||||
config HAVE_CHIPID
|
||||
@@ -134,6 +172,8 @@ config HAVE_STEPPER_BOTH_EDGE
|
||||
bool
|
||||
config HAVE_BOOTLOADER_REQUEST
|
||||
bool
|
||||
config HAVE_LIMITED_CODE_SIZE
|
||||
bool
|
||||
|
||||
config INLINE_STEPPER_HACK
|
||||
# Enables gcc to inline stepper_event() into the main timer irq handler
|
||||
|
||||
Reference in New Issue
Block a user