Browse Source

Generalise ADC driver source inclusion (#22448)

pull/22468/head
Joel Challis 5 months ago
committed by GitHub
parent
commit
e884e42ce9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 69 additions and 43 deletions
  1. +8
    -4
      builddefs/common_features.mk
  2. +1
    -1
      docs/adc_driver.md
  3. +1
    -1
      keyboards/1upkeyboards/1upslider8/rules.mk
  4. +2
    -1
      keyboards/cipulot/ec_23u/rules.mk
  5. +2
    -1
      keyboards/cipulot/ec_60/rules.mk
  6. +2
    -1
      keyboards/cipulot/ec_alveus/1_0_0/rules.mk
  7. +2
    -1
      keyboards/cipulot/ec_alveus/1_2_0/rules.mk
  8. +3
    -1
      keyboards/cipulot/ec_pro2/rules.mk
  9. +2
    -1
      keyboards/cipulot/ec_prox/ansi_iso/rules.mk
  10. +2
    -1
      keyboards/cipulot/ec_prox/jis/rules.mk
  11. +2
    -1
      keyboards/cipulot/ec_theca/rules.mk
  12. +2
    -1
      keyboards/cipulot/rf_r1_8_9xu/rules.mk
  13. +3
    -1
      keyboards/drop/alt/v2/rules.mk
  14. +3
    -1
      keyboards/drop/ctrl/v2/rules.mk
  15. +3
    -1
      keyboards/drop/shift/v2/rules.mk
  16. +3
    -2
      keyboards/gmmk/numpad/rules.mk
  17. +0
    -2
      keyboards/handwired/battleship_gamepad/rules.mk
  18. +2
    -2
      keyboards/handwired/onekey/keymaps/adc/rules.mk
  19. +0
    -1
      keyboards/handwired/onekey/nucleo_f446re/rules.mk
  20. +2
    -1
      keyboards/handwired/promethium/rules.mk
  21. +1
    -1
      keyboards/keebwerk/nano_slider/rules.mk
  22. +0
    -2
      keyboards/lime/keymaps/default/rules.mk
  23. +2
    -1
      keyboards/ploopyco/mouse/rules.mk
  24. +2
    -1
      keyboards/ploopyco/trackball/rules.mk
  25. +2
    -1
      keyboards/ploopyco/trackball_mini/rules.mk
  26. +2
    -1
      keyboards/ploopyco/trackball_thumb/rules.mk
  27. +3
    -1
      keyboards/sekigon/grs_70ec/rules.mk
  28. +1
    -1
      keyboards/splitkb/kyria/keymaps/gotham/rules.mk
  29. +1
    -1
      keyboards/tzarc/ghoul/rules.mk
  30. +1
    -1
      keyboards/ungodly/launch_pad/rules.mk
  31. +1
    -2
      keyboards/v4n4g0rth0n/v2/rules.mk
  32. +2
    -1
      keyboards/viktus/minne_topre/rules.mk
  33. +2
    -1
      keyboards/viktus/osav2_numpad_topre/rules.mk
  34. +2
    -1
      keyboards/viktus/osav2_topre/rules.mk
  35. +2
    -1
      keyboards/viktus/styrka_topre/rules.mk

+ 8
- 4
builddefs/common_features.mk View File

@ -139,8 +139,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
SPI_DRIVER_REQUIRED = yes
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
OPT_DEFS += -DSTM32_ADC -DHAL_USE_ADC=TRUE
LIB_SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c)
I2C_DRIVER_REQUIRED = yes
SRC += drivers/sensors/cirque_pinnacle.c
@ -840,8 +839,8 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/joystick.c
ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
ANALOG_DRIVER_REQUIRED = yes
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
SRC += analog.c
endif
ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
@ -886,9 +885,9 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
SPI_DRIVER_REQUIRED = yes
ANALOG_DRIVER_REQUIRED = yes
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
QUANTUM_LIB_SRC += analog.c
endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), rn42)
@ -935,6 +934,11 @@ ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
SRC += apa102.c
endif
ifeq ($(strip $(ANALOG_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DHAL_USE_ADC=TRUE
QUANTUM_LIB_SRC += analog.c
endif
ifeq ($(strip $(I2C_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DHAL_USE_I2C=TRUE
QUANTUM_LIB_SRC += i2c_master.c


+ 1
- 1
docs/adc_driver.md View File

@ -9,7 +9,7 @@ This driver currently supports both AVR and a limited selection of ARM devices.
To use this driver, add the following to your `rules.mk`:
```make
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
```
Then place this include at the top of your code:


+ 1
- 1
keyboards/1upkeyboards/1upslider8/rules.mk View File

@ -1 +1 @@
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_23u/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_60/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_alveus/1_0_0/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_alveus/1_2_0/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 3
- 1
keyboards/cipulot/ec_pro2/rules.mk View File

@ -1,2 +1,4 @@
CUSTOM_MATRIX = lite
SRC += analog.c matrix.c ec_switch_matrix.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_prox/ansi_iso/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_prox/jis/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/ec_theca/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/cipulot/rf_r1_8_9xu/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += matrix.c ec_switch_matrix.c
ANALOG_DRIVER_REQUIRED = yes

+ 3
- 1
keyboards/drop/alt/v2/rules.mk View File

@ -1,4 +1,6 @@
UF2_DEVICE_TYPE_ID = 0x35446147
UF2CONV_ARGS = --device-type $(UF2_DEVICE_TYPE_ID)
SRC += analog.c lib/common.c lib/mux.c
SRC += lib/common.c lib/mux.c
ANALOG_DRIVER_REQUIRED = yes

+ 3
- 1
keyboards/drop/ctrl/v2/rules.mk View File

@ -1,4 +1,6 @@
UF2_DEVICE_TYPE_ID = 0x27b9a6ea
UF2CONV_ARGS = --device-type $(UF2_DEVICE_TYPE_ID)
SRC += analog.c lib/common.c lib/mux.c
SRC += lib/common.c lib/mux.c
ANALOG_DRIVER_REQUIRED = yes

+ 3
- 1
keyboards/drop/shift/v2/rules.mk View File

@ -1,4 +1,6 @@
UF2_DEVICE_TYPE_ID = 0x9bc1e968
UF2CONV_ARGS = --device-type $(UF2_DEVICE_TYPE_ID)
SRC += analog.c lib/common.c lib/mux.c
SRC += lib/common.c lib/mux.c
ANALOG_DRIVER_REQUIRED = yes

+ 3
- 2
keyboards/gmmk/numpad/rules.mk View File

@ -18,5 +18,6 @@ RGB_MATRIX_ENABLE = yes
LTO_ENABLE = yes
SRC += analog.c \
matrix.c
ANALOG_DRIVER_REQUIRED = yes
SRC += matrix.c

+ 0
- 2
keyboards/handwired/battleship_gamepad/rules.mk View File

@ -1,5 +1,3 @@
SRC += analog.c
# Build Options
# change yes to no to disable
#


+ 2
- 2
keyboards/handwired/onekey/keymaps/adc/rules.mk View File

@ -1,3 +1,3 @@
SRC += analog.c
CONSOLE_ENABLE = yes
ANALOG_DRIVER_REQUIRED = yes

+ 0
- 1
keyboards/handwired/onekey/nucleo_f446re/rules.mk View File

@ -1 +0,0 @@
SRC += analog.c

+ 2
- 1
keyboards/handwired/promethium/rules.mk View File

@ -18,10 +18,11 @@ PS2_ENABLE = yes
PS2_DRIVER = interrupt
CUSTOM_MATRIX = yes
BLUETOOTH_ENABLE = yes
WS2812_DRIVER_REQUIRED = yes
ANALOG_DRIVER_REQUIRED = yes
SRC += rgbsps.c
SRC += analog.c
SRC += matrix.c
LTO_ENABLE = yes

+ 1
- 1
keyboards/keebwerk/nano_slider/rules.mk View File

@ -13,4 +13,4 @@ MIDI_ENABLE = yes # MIDI support
AUDIO_ENABLE = no # Audio output
LTO_ENABLE = yes
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes

+ 0
- 2
keyboards/lime/keymaps/default/rules.mk View File

@ -5,5 +5,3 @@ JOYSTICK_DRIVER = analog
EXTRAKEY_ENABLE = yes
WPM_ENABLE = yes
LTO_ENABLE = yes
SRC += analog.c

+ 2
- 1
keyboards/ploopyco/mouse/rules.mk View File

@ -19,5 +19,6 @@ MOUSEKEY_ENABLE = yes # Mouse keys
ENCODER_ENABLE := no
OPTS_DEF += -DENCODER_ENABLE
QUANTUM_LIB_SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
SRC += opt_encoder.c

+ 2
- 1
keyboards/ploopyco/trackball/rules.mk View File

@ -19,7 +19,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys
ENCODER_ENABLE := no
OPTS_DEF += -DENCODER_ENABLE
QUANTUM_LIB_SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
SRC += opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball/rev1_005

+ 2
- 1
keyboards/ploopyco/trackball_mini/rules.mk View File

@ -16,7 +16,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys
ENCODER_ENABLE := no
OPTS_DEF += -DENCODER_ENABLE
QUANTUM_LIB_SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
SRC += opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001

+ 2
- 1
keyboards/ploopyco/trackball_thumb/rules.mk View File

@ -3,7 +3,8 @@ F_CPU = 8000000
POINTING_DEVICE_DRIVER = pmw3360
QUANTUM_LIB_SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes
SRC += opt_encoder.c
DEFAULT_FOLDER = ploopyco/trackball_thumb/rev1_001

+ 3
- 1
keyboards/sekigon/grs_70ec/rules.mk View File

@ -13,4 +13,6 @@ AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
SPLIT_KEYBOARD = yes
SRC += analog.c ec_switch_matrix.c matrix.c
ANALOG_DRIVER_REQUIRED = yes
SRC += ec_switch_matrix.c matrix.c

+ 1
- 1
keyboards/splitkb/kyria/keymaps/gotham/rules.mk View File

@ -14,9 +14,9 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
endif
ifeq ($(strip $(THUMBSTICK_ENABLE)), yes)
ANALOG_DRIVER_REQUIRED = yes
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = custom
OPT_DEFS += -DTHUMBSTICK_ENABLE
SRC += analog.c
SRC += thumbstick.c
endif

+ 1
- 1
keyboards/tzarc/ghoul/rules.mk View File

@ -3,4 +3,4 @@ QUANTUM_PAINTER_DRIVERS = ssd1351_spi
DEFAULT_FOLDER = tzarc/ghoul/rev1/stm32
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes

+ 1
- 1
keyboards/ungodly/launch_pad/rules.mk View File

@ -19,4 +19,4 @@ MAGIC_ENABLE = no
GRAVE_ESC_ENABLE = no
LTO_ENABLE = yes
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes

+ 1
- 2
keyboards/v4n4g0rth0n/v2/rules.mk View File

@ -11,5 +11,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
SRC += analog.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/viktus/minne_topre/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += ec.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/viktus/osav2_numpad_topre/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += ec.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/viktus/osav2_topre/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += ec.c
ANALOG_DRIVER_REQUIRED = yes

+ 2
- 1
keyboards/viktus/styrka_topre/rules.mk View File

@ -1,3 +1,4 @@
CUSTOM_MATRIX = lite
QUANTUM_LIB_SRC += analog.c
SRC += ec.c
ANALOG_DRIVER_REQUIRED = yes

Loading…
Cancel
Save