Kconfig: Add new WANT_ADC option to reduce code size

Make it possible to not compile in support for ADC on chips with small
flash sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2025-04-09 12:52:11 -04:00
parent 04e7eb20fd
commit 8c67adc164
8 changed files with 28 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ CFLAGS += $(CFLAGS-y) -mmcu=$(CONFIG_MCU)
# Add avr source files
src-y += avr/main.c avr/timer.c
src-$(CONFIG_HAVE_GPIO) += avr/gpio.c
src-$(CONFIG_HAVE_GPIO_ADC) += avr/adc.c
src-$(CONFIG_WANT_ADC) += avr/adc.c
src-$(CONFIG_WANT_SPI) += avr/spi.c
src-$(CONFIG_WANT_I2C) += avr/i2c.c
src-$(CONFIG_WANT_HARD_PWM) += avr/hard_pwm.c