aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorDasky <32983009+daskygit@users.noreply.github.com>2021-01-30 03:53:56 +0000
committerGitHub <noreply@github.com>2021-01-29 19:53:56 -0800
commitd92ffd1157e3ecc4ae2dbf8548c45c8b0269f664 (patch)
tree9a1a1f9d06fe6b9b41e982d37895e19749fe53ec /quantum
parent3780ab3fcd4888cba4852158e11c495fc9809306 (diff)
downloadqmk_firmware-d92ffd1157e3ecc4ae2dbf8548c45c8b0269f664.tar.gz
qmk_firmware-d92ffd1157e3ecc4ae2dbf8548c45c8b0269f664.zip
Adds AT90USB162 support (#11570)
* at90usb162 support * fix missing bracket * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'quantum')
-rw-r--r--quantum/backlight/backlight_avr.c2
-rw-r--r--quantum/config_common.h2
-rw-r--r--quantum/dynamic_keymap.c2
-rw-r--r--quantum/mcu_selection.mk4
4 files changed, 6 insertions, 4 deletions
diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c
index 4d66da80b..2ecdd4f2c 100644
--- a/quantum/backlight/backlight_avr.c
+++ b/quantum/backlight/backlight_avr.c
@@ -68,7 +68,7 @@
68# define COMxx1 COM3A1 68# define COMxx1 COM3A1
69# define OCRxx OCR3A 69# define OCRxx OCR3A
70# endif 70# endif
71#elif (defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6) 71#elif (defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)) && (BACKLIGHT_PIN == B7 || BACKLIGHT_PIN == C5 || BACKLIGHT_PIN == C6)
72# define HARDWARE_PWM 72# define HARDWARE_PWM
73# define ICRx ICR1 73# define ICRx ICR1
74# define TCCRxA TCCR1A 74# define TCCRxA TCCR1A
diff --git a/quantum/config_common.h b/quantum/config_common.h
index 2d9c70b08..df3a6c5c5 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -39,7 +39,7 @@
39# define PIND_ADDRESS 0x9 39# define PIND_ADDRESS 0x9
40# define PINE_ADDRESS 0xC 40# define PINE_ADDRESS 0xC
41# define PINF_ADDRESS 0xF 41# define PINF_ADDRESS 0xF
42# elif defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) 42# elif defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
43# define ADDRESS_BASE 0x00 43# define ADDRESS_BASE 0x00
44# define PINB_ADDRESS 0x3 44# define PINB_ADDRESS 0x3
45# define PINC_ADDRESS 0x6 45# define PINC_ADDRESS 0x6
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c
index 0608b469c..a860b9497 100644
--- a/quantum/dynamic_keymap.c
+++ b/quantum/dynamic_keymap.c
@@ -37,6 +37,8 @@
37#ifndef DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 37#ifndef DYNAMIC_KEYMAP_EEPROM_MAX_ADDR
38# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) 38# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
39# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 39# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047
40# elif defined(__AVR_AT90USB162__)
41# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 511
40# else 42# else
41# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 43# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023
42# endif 44# endif
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 6b11eb498..09e07a37f 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -279,7 +279,7 @@ ifneq ($(findstring STM32F411, $(MCU)),)
279 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 279 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
280endif 280endif
281 281
282ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) 282ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
283 PROTOCOL = LUFA 283 PROTOCOL = LUFA
284 284
285 # Processor frequency. 285 # Processor frequency.
@@ -317,7 +317,7 @@ ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 a
317 ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) 317 ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
318 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 318 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
319 endif 319 endif
320 ifneq (,$(filter $(MCU),atmega16u2 atmega32u2)) 320 ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2))
321 NO_I2C = yes 321 NO_I2C = yes
322 endif 322 endif
323endif 323endif