Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840)
This commit is contained in:
parent
2e642699f7
commit
7baa37c3df
5 changed files with 22 additions and 15 deletions
|
@ -168,12 +168,14 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
|
||||||
|
|
||||||
LED_MATRIX_ENABLE ?= no
|
LED_MATRIX_ENABLE ?= no
|
||||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||||
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
|
||||||
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
|
|
||||||
|
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||||
|
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||||
|
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||||
else
|
else
|
||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
BACKLIGHT_DRIVER = custom
|
BACKLIGHT_DRIVER = custom
|
||||||
|
@ -181,19 +183,20 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
|
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||||
OPT_DEFS += -DIS31FL3731
|
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||||
SRC += is31fl3731-simple.c
|
SRC += is31fl3731-simple.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE ?= no
|
RGB_MATRIX_ENABLE ?= no
|
||||||
|
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||||
|
|
||||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||||
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_MATRIX_TYPES)),)
|
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||||
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||||
endif
|
endif
|
||||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||||
|
|
|
@ -10,7 +10,8 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r
|
||||||
|
|
||||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||||
|
|
||||||
LED_MATRIX_ENABLE = IS31FL3731
|
LED_MATRIX_ENABLE = yes
|
||||||
|
LED_MATRIX_DRIVER = IS31FL3731
|
||||||
|
|
||||||
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシ
|
||||||
|
|
||||||
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
|
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
|
||||||
|
|
||||||
LED_MATRIX_ENABLE = IS31FL3731
|
LED_MATRIX_ENABLE = yes
|
||||||
|
LED_MATRIX_DRIVER = IS31FL3731
|
||||||
|
|
||||||
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
|
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
MCU = STM32F303
|
MCU = STM32F303
|
||||||
|
|
||||||
# LED Configuration
|
# LED Configuration
|
||||||
LED_MATRIX_ENABLE = IS31FL3731
|
LED_MATRIX_ENABLE = yes
|
||||||
|
LED_MATRIX_DRIVER = IS31FL3731
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|
|
@ -26,7 +26,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: htt
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
LED_MATRIX_ENABLE = IS31FL3731
|
LED_MATRIX_ENABLE = yes
|
||||||
|
LED_MATRIX_DRIVER = IS31FL3731
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
WPM_ENABLE = yes
|
WPM_ENABLE = yes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue