Add logic for AT90USBxx7 where needed (#10203)
This commit is contained in:
parent
28ff51175b
commit
70fce6564f
5 changed files with 14 additions and 10 deletions
|
@ -35,30 +35,30 @@
|
||||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -10,6 +10,6 @@ MAX_KEYBOARD_SUBFOLDERS = 5
|
||||||
|
|
||||||
# Supported processor types
|
# Supported processor types
|
||||||
ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411'
|
||||||
AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None
|
AVR_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', 'atmega328p', 'atmega32a', None
|
||||||
ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS
|
ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS
|
||||||
VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85'
|
VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85'
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
# define PINB_ADDRESS 0x3
|
# define PINB_ADDRESS 0x3
|
||||||
# define PINC_ADDRESS 0x6
|
# define PINC_ADDRESS 0x6
|
||||||
# define PIND_ADDRESS 0x9
|
# define PIND_ADDRESS 0x9
|
||||||
# elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__)
|
# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
# define ADDRESS_BASE 0x00
|
# define ADDRESS_BASE 0x00
|
||||||
# define PINA_ADDRESS 0x0
|
# define PINA_ADDRESS 0x0
|
||||||
# define PINB_ADDRESS 0x3
|
# define PINB_ADDRESS 0x3
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||||
sei(); \
|
sei(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
|
# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
# define SERIAL_UART_BAUD 115200
|
# define SERIAL_UART_BAUD 115200
|
||||||
# define SERIAL_UART_DATA UDR1
|
# define SERIAL_UART_DATA UDR1
|
||||||
/* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */
|
/* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */
|
||||||
|
|
|
@ -40,6 +40,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#if defined(PROTOCOL_CHIBIOS)
|
#if defined(PROTOCOL_CHIBIOS)
|
||||||
# define RESET QK_RESET
|
# define RESET QK_RESET
|
||||||
#endif
|
#endif
|
||||||
|
// Gross hack, remove me and change RESET keycode to QK_BOOT
|
||||||
|
#if defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__)
|
||||||
|
# undef RESET
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "quantum_keycodes.h"
|
#include "quantum_keycodes.h"
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ ifneq ($(findstring STM32F411, $(MCU)),)
|
||||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286))
|
ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
|
||||||
PROTOCOL = LUFA
|
PROTOCOL = LUFA
|
||||||
|
|
||||||
# Processor frequency.
|
# Processor frequency.
|
||||||
|
|
Loading…
Reference in a new issue