From b84f264e57a3fbba7550d4d9b8fa73acd91c5ebc Mon Sep 17 00:00:00 2001 From: Kai Ryu Date: Mon, 4 Aug 2014 14:33:27 +0900 Subject: [PATCH] Add pin define to support AKB96 Rev3 --- keyboard/akb96/Makefile | 5 +++ keyboard/akb96/Makefile.pjrc | 8 +++++ keyboard/akb96/config.h | 2 +- keyboard/akb96/led.c | 32 +++++++++++++++-- keyboard/akb96/matrix.c | 67 +++++++++++++++++++++++++++++++----- 5 files changed, 103 insertions(+), 11 deletions(-) diff --git a/keyboard/akb96/Makefile b/keyboard/akb96/Makefile index 04054ce0..75dbfb19 100644 --- a/keyboard/akb96/Makefile +++ b/keyboard/akb96/Makefile @@ -112,6 +112,11 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# PCB Revision +ifdef REV + OPT_DEFS += -DREV_$(REV) +endif + # Additional definitions from command line ifdef DEFS OPT_DEFS += $(foreach DEF,$(DEFS),-D$(DEF)) diff --git a/keyboard/akb96/Makefile.pjrc b/keyboard/akb96/Makefile.pjrc index 5a07571c..82206fab 100644 --- a/keyboard/akb96/Makefile.pjrc +++ b/keyboard/akb96/Makefile.pjrc @@ -82,6 +82,13 @@ F_CPU = 16000000 # LUFA bootloader 4096 OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# PCB Revision +ifdef REV + OPT_DEFS += -DREV_$(REV) +else + OPT_DEFS += -DREV_V3 +endif + # Additional definitions from command line ifdef DEFS OPT_DEFS += $(foreach DEF,$(DEFS),-D$(DEF)) @@ -101,6 +108,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_EX_ENABLE = yes # External keymap in eeprom KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor +BREATHING_LED_ENABLE = yes # Enable breathing backlight diff --git a/keyboard/akb96/config.h b/keyboard/akb96/config.h index fd5cf649..ff7eccff 100644 --- a/keyboard/akb96/config.h +++ b/keyboard/akb96/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x9696 -#define DEVICE_VER 0x0001 +#define DEVICE_VER 0x0002 #define MANUFACTURER Leon #define PRODUCT Leon AKB96 #define DESCRIPTION t.m.k. keyboard firmware for AKB96 diff --git a/keyboard/akb96/led.c b/keyboard/akb96/led.c index d6319770..7a0b79d3 100644 --- a/keyboard/akb96/led.c +++ b/keyboard/akb96/led.c @@ -22,11 +22,16 @@ along with this program. If not, see . /* LED pin configration - * CapsLock PB5 (D9) - * NumLock PB2 (D16) + * REV_V2 + * CapsLock PB5 (D9) + * NumLock PB2 (D16) + * REV_V3 + * CapsLock PC7 + * NumLock PC6 */ void led_set(uint8_t usb_led) { +#if defined(REV_V2) if (usb_led & (1<> 4) | (~(PINF) & (1<