mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-24 17:37:40 +06:00
Generalise ADC driver source inclusion (#22448)
This commit is contained in:
parent
786ebf8760
commit
e884e42ce9
|
@ -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
|
||||
|
|
|
@ -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 @@
|
|||
SRC += analog.c
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += matrix.c ec_switch_matrix.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -18,5 +18,6 @@ RGB_MATRIX_ENABLE = yes
|
|||
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += analog.c \
|
||||
matrix.c
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
||||
SRC += matrix.c
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SRC += analog.c
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
SRC += analog.c
|
||||
|
||||
CONSOLE_ENABLE = yes
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
SRC += analog.c
|
|
@ -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
|
||||
|
|
|
@ -13,4 +13,4 @@ MIDI_ENABLE = yes # MIDI support
|
|||
AUDIO_ENABLE = no # Audio output
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += analog.c
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -5,5 +5,3 @@ JOYSTICK_DRIVER = analog
|
|||
EXTRAKEY_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += analog.c
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,4 +3,4 @@ QUANTUM_PAINTER_DRIVERS = ssd1351_spi
|
|||
|
||||
DEFAULT_FOLDER = tzarc/ghoul/rev1/stm32
|
||||
|
||||
SRC += analog.c
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -19,4 +19,4 @@ MAGIC_ENABLE = no
|
|||
GRAVE_ESC_ENABLE = no
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += analog.c
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += ec.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += ec.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += ec.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CUSTOM_MATRIX = lite
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
SRC += ec.c
|
||||
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
|
|
Loading…
Reference in New Issue
Block a user