diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2023-06-08 11:20:59 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2023-06-08 12:59:30 -0400 |
commit | 15d302901f356c5041bb952c2d9a5f56610be658 (patch) | |
tree | b26784477f2b493f677ec0edeee26bd8a995f863 /src/spicmds.c | |
parent | 645a1b8364c3110f706db0f976ac5fa20b968c36 (diff) | |
download | kutter-15d302901f356c5041bb952c2d9a5f56610be658.tar.gz kutter-15d302901f356c5041bb952c2d9a5f56610be658.tar.xz kutter-15d302901f356c5041bb952c2d9a5f56610be658.zip |
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>
Diffstat (limited to 'src/spicmds.c')
-rw-r--r-- | src/spicmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spicmds.c b/src/spicmds.c index 2c3f3ed6..8ea915d9 100644 --- a/src/spicmds.c +++ b/src/spicmds.c @@ -5,7 +5,7 @@ // This file may be distributed under the terms of the GNU GPLv3 license. #include <string.h> // memcpy -#include "autoconf.h" // CONFIG_HAVE_GPIO_BITBANGING +#include "autoconf.h" // CONFIG_WANT_SOFTWARE_SPI #include "board/gpio.h" // gpio_out_write #include "basecmd.h" // oid_alloc #include "command.h" // DECL_COMMAND @@ -92,7 +92,7 @@ spidev_transfer(struct spidev_s *spi, uint8_t receive_data // Not yet initialized return; - if (CONFIG_HAVE_GPIO_BITBANGING && flags & SF_SOFTWARE) + if (CONFIG_WANT_SOFTWARE_SPI && flags & SF_SOFTWARE) spi_software_prepare(spi->spi_software); else spi_prepare(spi->spi_config); @@ -100,7 +100,7 @@ spidev_transfer(struct spidev_s *spi, uint8_t receive_data if (flags & SF_HAVE_PIN) gpio_out_write(spi->pin, !!(flags & SF_CS_ACTIVE_HIGH)); - if (CONFIG_HAVE_GPIO_BITBANGING && flags & SF_SOFTWARE) + if (CONFIG_WANT_SOFTWARE_SPI && flags & SF_SOFTWARE) spi_software_transfer(spi->spi_software, receive_data, data_len, data); else spi_transfer(spi->spi_config, receive_data, data_len, data); |