Browse Source

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

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

+ 4
- 1
build_keyboard.mk View File

@ -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
- 0
build_test.mk View File

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


+ 2
- 10
common_features.mk View File

@ -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


drivers/arm/analog.c → drivers/chibios/analog.c View File


drivers/arm/analog.h → drivers/chibios/analog.h View File


drivers/arm/i2c_master.c → drivers/chibios/i2c_master.c View File


drivers/arm/i2c_master.h → drivers/chibios/i2c_master.h View File


drivers/arm/ws2812.c → drivers/chibios/ws2812.c View File


drivers/arm/ws2812.h → drivers/chibios/ws2812.h View File


drivers/arm/ws2812_pwm.c → drivers/chibios/ws2812_pwm.c View File


drivers/arm/ws2812_spi.c → drivers/chibios/ws2812_spi.c View File


+ 1
- 1
keyboards/hs60/v2/ansi/rules.mk View File

@ -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

+ 1
- 1
keyboards/hs60/v2/hhkb/rules.mk View File

@ -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

+ 1
- 1
keyboards/hs60/v2/iso/rules.mk View File

@ -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

+ 1
- 1
keyboards/nk65/rules.mk View File

@ -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

+ 1
- 1
keyboards/wilba_tech/wt_rgb_backlight.c View File

@ -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)


quantum/audio/audio.c → quantum/audio/audio_avr.c View File


quantum/audio/audio_arm.c → quantum/audio/audio_chibios.c View File


quantum/backlight/backlight_arm.c → quantum/backlight/backlight_chibios.c View File


+ 1
- 1
tmk_core/chibios.mk View File

@ -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


+ 2
- 12
tmk_core/common.mk View File

@ -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