From 4b194472beea4fe799b98b83ca6a7bc49e12b406 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 28 Sep 2018 20:20:33 -0400 Subject: [PATCH] add atmega16 chips, link to references --- quantum/config_common.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/quantum/config_common.h b/quantum/config_common.h index fb0cffe8b8..822ac35611 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -26,6 +26,9 @@ #define PORT_SHIFTER 4 // this may be 4 for all AVR chips + // If you want to add more to this list, reference the PINx definitions in these header + // files: https://github.com/vancegroup-mirrors/avr-libc/tree/master/avr-libc/include/avr + #if defined(__AVR_ATmega32U4__) #define ADDRESS_BASE 0x00 #define PINB_ADDRESS 0x3 @@ -52,6 +55,18 @@ #define PINC_ADDRESS 0x3 #define PINB_ADDRESS 0x6 #define PINA_ADDRESS 0x9 + #elif defined(__AVR_ATmega16U2__) + #define ADDRESS_BASE 0x00 + #define PINB_ADDRESS 0x3 + #define PINC_ADDRESS 0x6 + #define PIND_ADDRESS 0x9 + #elif defined(__AVR_ATmega16U4__) + #define ADDRESS_BASE 0x00 + #define PINB_ADDRESS 0x3 + #define PINC_ADDRESS 0x6 + #define PIND_ADDRESS 0x9 + #define PINE_ADDRESS 0xC + #define PINF_ADDRESS 0xF #else #error "Pins are not defined" #endif