diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-06-08 19:35:45 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-06-13 23:18:59 -0400 |
commit | c20f99374701709888644f7a5d849985ac29fdf9 (patch) | |
tree | 5726272289e3339067834b3f11e47ed96e290f92 /src | |
parent | 71947d6beafe118259ca2805dbb21fac5ab3b165 (diff) | |
download | kutter-c20f99374701709888644f7a5d849985ac29fdf9.tar.gz kutter-c20f99374701709888644f7a5d849985ac29fdf9.tar.xz kutter-c20f99374701709888644f7a5d849985ac29fdf9.zip |
spicmds: Add Kconfig option to allow boards to disable SPI commands
Some boards may not support SPI transfers. Update the build so that
those commands do not need to be compiled if they are not available.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/Kconfig | 3 | ||||
-rw-r--r-- | src/Makefile | 3 | ||||
-rw-r--r-- | src/avr/Kconfig | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig index ac9322ee..0445685e 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -18,6 +18,9 @@ source "src/simulator/Kconfig" config HAVE_GPIO_ADC bool default n +config HAVE_GPIO_SPI + bool + default n config INLINE_STEPPER_HACK # Enables gcc to inline stepper_event() into the main timer irq handler diff --git a/src/Makefile b/src/Makefile index 5a640863..5c7dc085 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,5 @@ # Main code build rules -src-y += sched.c command.c stepper.c basecmd.c gpiocmds.c spicmds.c endstop.c +src-y += sched.c command.c stepper.c basecmd.c gpiocmds.c endstop.c src-$(CONFIG_HAVE_GPIO_ADC) += adccmds.c +src-$(CONFIG_HAVE_GPIO_SPI) += spicmds.c diff --git a/src/avr/Kconfig b/src/avr/Kconfig index 9cfbec07..efc8484a 100644 --- a/src/avr/Kconfig +++ b/src/avr/Kconfig @@ -6,6 +6,7 @@ config AVR_SELECT bool default y select HAVE_GPIO_ADC + select HAVE_GPIO_SPI config BOARD_DIRECTORY string |