Browse Source

Initial arm->chibios pass - simplify some platform logic (#8450)

master
Joel Challis 2 years ago
committed by GitHub
parent
commit
d96380e654
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      build_keyboard.mk
  2. 1
      build_test.mk
  3. 12
      common_features.mk
  4. 0
      drivers/chibios/analog.c
  5. 0
      drivers/chibios/analog.h
  6. 0
      drivers/chibios/i2c_master.c
  7. 0
      drivers/chibios/i2c_master.h
  8. 0
      drivers/chibios/ws2812.c
  9. 0
      drivers/chibios/ws2812.h
  10. 0
      drivers/chibios/ws2812_pwm.c
  11. 0
      drivers/chibios/ws2812_spi.c
  12. 2
      keyboards/hs60/v2/ansi/rules.mk
  13. 2
      keyboards/hs60/v2/hhkb/rules.mk
  14. 2
      keyboards/hs60/v2/iso/rules.mk
  15. 2
      keyboards/nk65/rules.mk
  16. 2
      keyboards/wilba_tech/wt_rgb_backlight.c
  17. 0
      quantum/audio/audio_avr.c
  18. 0
      quantum/audio/audio_chibios.c
  19. 0
      quantum/backlight/backlight_chibios.c
  20. 2
      tmk_core/chibios.mk
  21. 14
      tmk_core/common.mk

5
build_keyboard.mk

@ -231,13 +231,16 @@ endif
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
# not used for LUFA
ifdef MCU_FAMILY
FIRMWARE_FORMAT?=bin
PLATFORM=CHIBIOS
PLATFORM_KEY=chibios
FIRMWARE_FORMAT?=bin
else ifdef ARM_ATSAM
PLATFORM=ARM_ATSAM
PLATFORM_KEY=arm_atsam
FIRMWARE_FORMAT=bin
else
PLATFORM=AVR
PLATFORM_KEY=avr
FIRMWARE_FORMAT?=hex
endif

1
build_test.mk

@ -41,6 +41,7 @@ all: elf
VPATH += $(COMMON_VPATH)
PLATFORM:=TEST
PLATFORM_KEY:=test
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include tests/$(TEST)/rules.mk

12
common_features.mk

@ -35,11 +35,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
MUSIC_ENABLE := 1
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/audio/audio.c
else
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
endif
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c
endif
@ -315,11 +311,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
else
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
else
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
endif
SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
else
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
endif

0
drivers/arm/analog.c → drivers/chibios/analog.c

0
drivers/arm/analog.h → drivers/chibios/analog.h

0
drivers/arm/i2c_master.c → drivers/chibios/i2c_master.c

0
drivers/arm/i2c_master.h → drivers/chibios/i2c_master.h

0
drivers/arm/ws2812.c → drivers/chibios/ws2812.c

0
drivers/arm/ws2812.h → drivers/chibios/ws2812.h

0
drivers/arm/ws2812_pwm.c → drivers/chibios/ws2812_pwm.c

0
drivers/arm/ws2812_spi.c → drivers/chibios/ws2812_spi.c

2
keyboards/hs60/v2/ansi/rules.mk

@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
drivers/chibios/i2c_master.c

2
keyboards/hs60/v2/hhkb/rules.mk

@ -28,4 +28,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
drivers/chibios/i2c_master.c

2
keyboards/hs60/v2/iso/rules.mk

@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
drivers/chibios/i2c_master.c

2
keyboards/nk65/rules.mk

@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
drivers/chibios/i2c_master.c

2
keyboards/wilba_tech/wt_rgb_backlight.c

@ -49,7 +49,7 @@
#else
#include "ch.h"
#include "hal.h"
#include "drivers/arm/i2c_master.h"
#include "drivers/chibios/i2c_master.h"
#endif
#if defined(RGB_BACKLIGHT_DAWN60)

0
quantum/audio/audio.c → quantum/audio/audio_avr.c

0
quantum/audio/audio_arm.c → quantum/audio/audio_chibios.c

0
quantum/backlight/backlight_arm.c → quantum/backlight/backlight_chibios.c

2
tmk_core/chibios.mk

@ -179,7 +179,7 @@ HEX = $(OBJCOPY) -O $(FORMAT)
EEP =
BIN = $(OBJCOPY) -O binary
COMMON_VPATH += $(DRIVER_PATH)/arm
COMMON_VPATH += $(DRIVER_PATH)/chibios
THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB

14
tmk_core/common.mk

@ -1,13 +1,5 @@
COMMON_DIR = common
ifeq ($(PLATFORM),AVR)
PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr
else ifeq ($(PLATFORM),CHIBIOS)
PLATFORM_COMMON_DIR = $(COMMON_DIR)/chibios
else ifeq ($(PLATFORM),ARM_ATSAM)
PLATFORM_COMMON_DIR = $(COMMON_DIR)/arm_atsam
else
PLATFORM_COMMON_DIR = $(COMMON_DIR)/test
endif
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/keyboard.c \
@ -179,6 +171,4 @@ endif
# Search Path
VPATH += $(TMK_PATH)/$(COMMON_DIR)
ifeq ($(PLATFORM),CHIBIOS)
VPATH += $(TMK_PATH)/$(COMMON_DIR)/chibios
endif
VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)

Loading…
Cancel
Save