From 2b9b267e8ee1a49c448b5f0f5b9fd634bd6c4489 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 23 Oct 2020 12:21:56 +1100 Subject: [PATCH] Fix RGB matrix for ATmegaxxU2 (#10723) --- common_features.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common_features.mk b/common_features.mk index e0ae1d74c1..5f232d5f0d 100644 --- a/common_features.mk +++ b/common_features.mk @@ -184,6 +184,10 @@ ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type) endif OPT_DEFS += -DRGB_MATRIX_ENABLE +ifneq (,$(filter $(MCU), atmega16u2 atmega32u2)) + # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines + OPT_DEFS += -DLIB8_ATTINY +endif SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c