fix(drivers): Avoid build failures for GPIO driver
* Avoid defining the ZMK GPIO drivers lib if none of the drivers are selected.
This commit is contained in:
parent
505c481f6a
commit
b5e73204e8
4 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
# Copyright (c) 2020 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
add_subdirectory(gpio)
|
add_subdirectory_ifdef(CONFIG_ZMK_DRIVERS_GPIO gpio)
|
||||||
add_subdirectory(kscan)
|
add_subdirectory(kscan)
|
||||||
add_subdirectory(sensor)
|
add_subdirectory(sensor)
|
||||||
add_subdirectory(display)
|
add_subdirectory(display)
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
|
menuconfig ZMK_DRIVERS_GPIO
|
||||||
|
bool "GPIO"
|
||||||
|
|
||||||
rsource "Kconfig.mcp23017"
|
rsource "Kconfig.mcp23017"
|
||||||
rsource "Kconfig.595"
|
rsource "Kconfig.595"
|
|
@ -10,6 +10,7 @@ menuconfig GPIO_595
|
||||||
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_GPIO_595))
|
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_GPIO_595))
|
||||||
depends on SPI
|
depends on SPI
|
||||||
select HAS_DTS_GPIO
|
select HAS_DTS_GPIO
|
||||||
|
select ZMK_DRIVERS_GPIO
|
||||||
help
|
help
|
||||||
Enable driver for 595 shift register chip using SPI.
|
Enable driver for 595 shift register chip using SPI.
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig GPIO_MCP23017
|
||||||
bool "MCP23017 I2C-based GPIO chip"
|
bool "MCP23017 I2C-based GPIO chip"
|
||||||
depends on I2C
|
depends on I2C
|
||||||
select HAS_DTS_GPIO
|
select HAS_DTS_GPIO
|
||||||
|
select ZMK_DRIVERS_GPIO
|
||||||
help
|
help
|
||||||
Enable driver for MCP23017 I2C-based GPIO chip.
|
Enable driver for MCP23017 I2C-based GPIO chip.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue