1
0
Fork 0

Generalise ADC driver source inclusion (#22448)

This commit is contained in:
Joel Challis 2023-11-12 22:30:27 +00:00 committed by GitHub
parent 786ebf8760
commit e884e42ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 69 additions and 43 deletions

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