VIA Configurator Refactor (#7268)

* VIA Refactor

* Remove old code

* review changes

* review changes

* Fix cannonkeys/satisfaction75/prototype:via build

* Add via.h to quantum.h

* Move backlight init to after backlight config load

* Merge branch 'master' into via_refactor_pr

* Update user's rules.mk to new way of enabling VIA

* Added id_switch_matrix_state

* Review changes
master
Wilba 2020-01-04 07:52:00 +11:00 committed by Drashna Jaelre
parent b362595665
commit 320822d75b
167 changed files with 1502 additions and 3157 deletions

View File

@ -82,19 +82,19 @@ endif
ifeq ($(strip $(UCIS_ENABLE)), yes) ifeq ($(strip $(UCIS_ENABLE)), yes)
OPT_DEFS += -DUCIS_ENABLE OPT_DEFS += -DUCIS_ENABLE
UNICODE_COMMON = yes UNICODE_COMMON := yes
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
endif endif
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
OPT_DEFS += -DUNICODEMAP_ENABLE OPT_DEFS += -DUNICODEMAP_ENABLE
UNICODE_COMMON = yes UNICODE_COMMON := yes
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
endif endif
ifeq ($(strip $(UNICODE_ENABLE)), yes) ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE OPT_DEFS += -DUNICODE_ENABLE
UNICODE_COMMON = yes UNICODE_COMMON := yes
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
endif endif
@ -107,13 +107,13 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight.c SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes CIE1931_CURVE := yes
LED_BREATHING_TABLE = yes LED_BREATHING_TABLE := yes
RGB_KEYCODES_ENABLE = yes RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
else else
WS2812_DRIVER_REQUIRED = yes WS2812_DRIVER_REQUIRED := yes
endif endif
endif endif
@ -147,12 +147,12 @@ endif
SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix.c
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
CIE1931_CURVE = yes CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE = yes RGB_KEYCODES_ENABLE := yes
endif endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
RGB_MATRIX_ENABLE = IS31FL3731 RGB_MATRIX_ENABLE := IS31FL3731
endif endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
@ -178,7 +178,7 @@ endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
OPT_DEFS += -DWS2812 OPT_DEFS += -DWS2812
WS2812_DRIVER_REQUIRED = yes WS2812_DRIVER_REQUIRED := yes
endif endif
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
@ -232,12 +232,12 @@ endif
endif endif
ifeq ($(strip $(LCD_ENABLE)), yes) ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE = yes CIE1931_CURVE := yes
endif endif
# backward compat # backward compat
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
BACKLIGHT_DRIVER = custom BACKLIGHT_DRIVER := custom
endif endif
VALID_BACKLIGHT_TYPES := pwm software custom VALID_BACKLIGHT_TYPES := pwm software custom
@ -250,7 +250,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
endif endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE = yes CIE1931_CURVE := yes
endif endif
COMMON_VPATH += $(QUANTUM_DIR)/backlight COMMON_VPATH += $(QUANTUM_DIR)/backlight
@ -294,12 +294,12 @@ endif
ifeq ($(strip $(CIE1931_CURVE)), yes) ifeq ($(strip $(CIE1931_CURVE)), yes)
OPT_DEFS += -DUSE_CIE1931_CURVE OPT_DEFS += -DUSE_CIE1931_CURVE
LED_TABLES = yes LED_TABLES := yes
endif endif
ifeq ($(strip $(LED_BREATHING_TABLE)), yes) ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
OPT_DEFS += -DUSE_LED_BREATHING_TABLE OPT_DEFS += -DUSE_LED_BREATHING_TABLE
LED_TABLES = yes LED_TABLES := yes
endif endif
ifeq ($(strip $(LED_TABLES)), yes) ifeq ($(strip $(LED_TABLES)), yes)
@ -349,6 +349,14 @@ ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/velocikey.c SRC += $(QUANTUM_DIR)/velocikey.c
endif endif
ifeq ($(strip $(VIA_ENABLE)), yes)
DYNAMIC_KEYMAP_ENABLE := yes
RAW_ENABLE := yes
BOOTMAGIC_ENABLE := lite
SRC += $(QUANTUM_DIR)/via.c
OPT_DEFS += -DVIA_ENABLE
endif
ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE
SRC += $(QUANTUM_DIR)/dynamic_keymap.c SRC += $(QUANTUM_DIR)/dynamic_keymap.c

View File

@ -46,23 +46,3 @@
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,68 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
@ -30,5 +30,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
# project specific files
SRC = keyboards/wilba_tech/wt_main.c

View File

@ -46,24 +46,3 @@
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[1] = LAYOUT_ext65( [1] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[2] = LAYOUT_ext65( [2] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[3] = LAYOUT_ext65( [3] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
) )

View File

@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[1] = LAYOUT_ext65( [1] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[2] = LAYOUT_ext65( [2] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
), ),
@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[3] = LAYOUT_ext65( [3] = LAYOUT_ext65(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
) )

View File

@ -1,68 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
@ -29,6 +29,3 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
# project specific files
SRC += keyboards/wilba_tech/wt_main.c

View File

@ -242,25 +242,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0 // #define BOOTMAGIC_LITE_COLUMN 0
/* VIA Configurator Compatibility */
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,85 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
SRC += keyboards/wilba_tech/wt_main.c
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -58,26 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PIN_WS2812 15 #define PIN_WS2812 15
#define WS2812_SPI SPID2 #define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
// EEPROM usage // dynamic keymaps start after this.
// TODO: refactor with new user EEPROM code (coming soon) #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 40
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x03
#define EEPROM_VERSION_ADDR 42
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
// start + layer * rows * col * 2
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
#define EEPROM_CUSTOM_BACKLIGHT 644
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -53,7 +53,4 @@ CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
LAYOUTS = 60_ansi 60_tsangan_hhkb LAYOUTS = 60_ansi 60_tsangan_hhkb

View File

@ -50,26 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x02
#define EEPROM_VERSION_ADDR 36
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
// start + layer * rows * col * 2
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
#define EEPROM_CUSTOM_BACKLIGHT 678
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 679
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 202
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -52,6 +52,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -58,26 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PIN_WS2812 15 #define PIN_WS2812 15
#define WS2812_SPI SPID2 #define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
// EEPROM usage // dynamic keymaps start after this.
// TODO: refactor with new user EEPROM code (coming soon) #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 40
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x03
#define EEPROM_VERSION_ADDR 42
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
// start + layer * rows * col * 2
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
#define EEPROM_CUSTOM_BACKLIGHT 644
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -55,7 +55,4 @@ CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
LAYOUTS = 60_ansi 60_tsangan_hhkb LAYOUTS = 60_ansi 60_tsangan_hhkb

View File

@ -50,25 +50,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
// EEPROM usage // Backlight config starts after VIA's EEPROM usage,
// TODO: refactor with new user EEPROM code (coming soon) // dynamic keymaps start after this.
#define EEPROM_MAGIC 0x451F #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC_ADDR 40
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x02
#define EEPROM_VERSION_ADDR 42
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
// start + layer * rows * col * 2
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
#define EEPROM_CUSTOM_BACKLIGHT 684
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -64,41 +64,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
// Custom config starts after VIA's EEPROM usage,
#define DYNAMIC_KEYMAP_LAYER_COUNT 4 // dynamic keymaps start after this.
// Custom config Usage:
// EEPROM usage // 1 for enabled encoder modes (1 byte)
// 1 for custom backlighting controls (1 byte)
// TODO: refactor with new user EEPROM code (coming soon) // 1 for OLED default mode (1 byte)
#define EEPROM_MAGIC 0x451F // 6 for 3x custom encoder settings, left, right, and press (18 bytes)
#define EEPROM_MAGIC_ADDR 40 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x01
#define EEPROM_VERSION_ADDR 42
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803
// I'm also putting my custom stuff after that
// 1 for enabled encoder modes
// 1 for custom backlighting controls
// 1 for OLED default mode
// 6 for 3x custom encoder settings, left, right, and press (18 total)
#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 811
#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 812
#define DYNAMIC_KEYMAP_DEFAULT_OLED 813
#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 814
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 832
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -1,4 +1,3 @@
# rules.mk overrides to enable VIA # rules.mk overrides to enable VIA
RAW_ENABLE = yes VIA_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -17,3 +17,20 @@
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
} }
// Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row
#define LAYOUT_all( \
K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \
) { \
{ K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
{ K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
}

View File

@ -51,7 +51,4 @@ ENCODER_ENABLE = yes
QWIIC_ENABLE += MICRO_OLED QWIIC_ENABLE += MICRO_OLED
#BACKLIGHT_ENABLE = yes #BACKLIGHT_ENABLE = yes
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1

View File

@ -15,11 +15,7 @@
#include "raw_hid.h" #include "raw_hid.h"
#include "dynamic_keymap.h" #include "dynamic_keymap.h"
#include "tmk_core/common/eeprom.h" #include "tmk_core/common/eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
// HACK
#include "keyboards/wilba_tech/via_api.h" // Temporary hack
#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack
/* Artificial delay added to get media keys to work in the encoder*/ /* Artificial delay added to get media keys to work in the encoder*/
#define MEDIA_KEY_DELAY 10 #define MEDIA_KEY_DELAY 10
@ -58,56 +54,20 @@ backlight_config_t kb_backlight_config = {
.level = BACKLIGHT_LEVELS .level = BACKLIGHT_LEVELS
}; };
bool eeprom_is_valid(void) #ifdef VIA_ENABLE
{ void raw_hid_receive_kb( uint8_t *data, uint8_t length )
return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC &&
eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION);
}
void eeprom_set_valid(bool valid)
{
eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF);
eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF);
}
void eeprom_reset(void)
{
// Set the VIA specific EEPROM state as invalid.
eeprom_set_valid(false);
// Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable();
}
#ifdef RAW_ENABLE
void raw_hid_receive( uint8_t *data, uint8_t length )
{ {
uint8_t *command_id = &(data[0]); uint8_t *command_id = &(data[0]);
uint8_t *command_data = &(data[1]); uint8_t *command_data = &(data[1]);
switch ( *command_id ) switch ( *command_id )
{ {
case id_get_protocol_version:
{
command_data[0] = PROTOCOL_VERSION >> 8;
command_data[1] = PROTOCOL_VERSION & 0xFF;
break;
}
case id_get_keyboard_value: case id_get_keyboard_value:
{ {
switch( command_data[0]) switch( command_data[0])
{ {
case id_uptime:
{
uint32_t value = timer_read32();
command_data[1] = (value >> 24 ) & 0xFF;
command_data[2] = (value >> 16 ) & 0xFF;
command_data[3] = (value >> 8 ) & 0xFF;
command_data[4] = value & 0xFF;
break;
}
case id_oled_default_mode: case id_oled_default_mode:
{ {
uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); uint8_t default_oled = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED);
command_data[1] = default_oled; command_data[1] = default_oled;
break; break;
} }
@ -143,13 +103,12 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
} }
break; break;
} }
#ifdef DYNAMIC_KEYMAP_ENABLE
case id_set_keyboard_value: case id_set_keyboard_value:
{ {
switch(command_data[0]){ switch(command_data[0]){
case id_oled_default_mode: case id_oled_default_mode:
{ {
eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]); eeprom_update_byte((uint8_t*)EEPROM_DEFAULT_OLED, command_data[1]);
break; break;
} }
case id_oled_mode: case id_oled_mode:
@ -161,7 +120,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
case id_encoder_modes: case id_encoder_modes:
{ {
enabled_encoder_modes = command_data[1]; enabled_encoder_modes = command_data[1];
eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes); eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, enabled_encoder_modes);
break; break;
} }
case id_encoder_custom: case id_encoder_custom:
@ -179,82 +138,6 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
} }
} }
break; break;
}
case id_dynamic_keymap_get_keycode:
{
uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] );
command_data[3] = keycode >> 8;
command_data[4] = keycode & 0xFF;
break;
}
case id_dynamic_keymap_set_keycode:
{
dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] );
break;
}
case id_dynamic_keymap_reset:
{
dynamic_keymap_reset();
break;
}
case id_dynamic_keymap_macro_get_count:
{
command_data[0] = dynamic_keymap_macro_get_count();
break;
}
case id_dynamic_keymap_macro_get_buffer_size:
{
uint16_t size = dynamic_keymap_macro_get_buffer_size();
command_data[0] = size >> 8;
command_data[1] = size & 0xFF;
break;
}
case id_dynamic_keymap_macro_get_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] );
break;
}
case id_dynamic_keymap_macro_reset:
{
dynamic_keymap_macro_reset();
break;
}
case id_dynamic_keymap_get_layer_count:
{
command_data[0] = dynamic_keymap_get_layer_count();
break;
}
case id_dynamic_keymap_get_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_get_buffer( offset, size, &command_data[3] );
break;
}
case id_dynamic_keymap_set_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_set_buffer( offset, size, &command_data[3] );
break;
}
#endif // DYNAMIC_KEYMAP_ENABLE
case id_eeprom_reset:
{
eeprom_reset();
break;
}
case id_bootloader_jump:
{
// Need to send data back before the jump
// Informs host that the command is handled
raw_hid_send( data, length );
// Give host time to read it
wait_ms(100);
bootloader_jump();
break;
} }
default: default:
{ {
@ -263,12 +146,8 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
break; break;
} }
} }
// DO NOT call raw_hid_send(data,length) here, let caller do this
// Return same buffer with values changed
raw_hid_send( data, length );
} }
#endif #endif
@ -349,18 +228,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
break; break;
} }
#ifdef DYNAMIC_KEYMAP_ENABLE
// Handle macros
if (record->event.pressed) {
if ( keycode >= MACRO00 && keycode <= MACRO15 )
{
uint8_t id = keycode - MACRO00;
dynamic_keymap_macro_send(id);
return false;
}
}
#endif //DYNAMIC_KEYMAP_ENABLE
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
@ -392,55 +259,52 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
} }
} }
void dynamic_keymap_custom_reset(void){ void custom_config_reset(void){
void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); void *p = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR);
void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); void *end = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE);
while ( p != end ) { while ( p != end ) {
eeprom_update_byte(p, 0); eeprom_update_byte(p, 0);
++p; ++p;
} }
eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F); eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F);
} }
void save_backlight_config_to_eeprom(){ void backlight_config_save(){
eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw); eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw);
} }
void load_custom_config(){ void custom_config_load(){
kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT);
#ifdef DYNAMIC_KEYMAP_ENABLE #ifdef DYNAMIC_KEYMAP_ENABLE
oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED);
enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES); enabled_encoder_modes = eeprom_read_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES);
#endif #endif
} }
void eeprom_init_kb(void) // Called from via_init() if VIA_ENABLE
// Called from matrix_init_kb() if not VIA_ENABLE
void via_init_kb(void)
{ {
// If the EEPROM has the magic, the data is good. // If the EEPROM has the magic, the data is good.
// OK to load from EEPROM. // OK to load from EEPROM.
if (eeprom_is_valid()) { if (via_eeprom_is_valid()) {
load_custom_config(); custom_config_load();
} else { } else {
// If the EEPROM has not been saved before, or is out of date,
// save the default values to the EEPROM. Default values
// come from construction of the zeal_backlight_config instance.
//backlight_config_save();
#ifdef DYNAMIC_KEYMAP_ENABLE #ifdef DYNAMIC_KEYMAP_ENABLE
// This resets the keymaps in EEPROM to what is in flash.
dynamic_keymap_reset();
// This resets the macros in EEPROM to nothing.
dynamic_keymap_macro_reset();
// Reset the custom stuff // Reset the custom stuff
dynamic_keymap_custom_reset(); custom_config_reset();
#endif #endif
// Save the magic number last, in case saving was interrupted // DO NOT set EEPROM valid here, let caller do this
eeprom_set_valid(true);
} }
} }
void matrix_init_kb(void) void matrix_init_kb(void)
{ {
eeprom_init_kb(); #ifndef VIA_ENABLE
via_init_kb();
via_eeprom_set_valid(true);
#endif // VIA_ENABLE
rtcGetTime(&RTCD1, &last_timespec); rtcGetTime(&RTCD1, &last_timespec);
queue_for_send = true; queue_for_send = true;
backlight_init_ports(); backlight_init_ports();
@ -472,3 +336,51 @@ void matrix_scan_kb(void) {
#endif #endif
} }
//
// In the case of VIA being disabled, we still need to check if
// keyboard level EEPROM memory is valid before loading.
// Thus these are copies of the same functions in VIA, since
// the backlight settings reuse VIA's EEPROM magic/version,
// and the ones in via.c won't be compiled in.
//
// Yes, this is sub-optimal, and is only here for completeness
// (i.e. catering to the 1% of people that want wilba.tech LED bling
// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA).
//
#ifndef VIA_ENABLE
bool via_eeprom_is_valid(void)
{
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 &&
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 &&
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 );
}
// Sets VIA/keyboard level usage of EEPROM to valid/invalid
// Keyboard level code (eg. via_init_kb()) should not call this
void via_eeprom_set_valid(bool valid)
{
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF);
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF);
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF);
}
void via_eeprom_reset(void)
{
// Set the VIA specific EEPROM state as invalid.
via_eeprom_set_valid(false);
// Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable();
}
#endif // VIA_ENABLE

View File

@ -8,6 +8,12 @@
#include "rev1.h" #include "rev1.h"
#endif #endif
#include "via.h" // only for EEPROM address
#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR)
#define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1)
#define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2)
#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3)
/* screen off after this many milliseconds */ /* screen off after this many milliseconds */
#define ScreenOffInterval 60000 /* milliseconds */ #define ScreenOffInterval 60000 /* milliseconds */
@ -117,5 +123,5 @@ void backlight_set(uint8_t level);
bool is_breathing(void); bool is_breathing(void);
void breathing_enable(void); void breathing_enable(void);
void breathing_disable(void); void breathing_disable(void);
void load_custom_config(void); void custom_config_load(void);
void save_backlight_config_to_eeprom(void); void backlight_config_save(void);

View File

@ -12,7 +12,7 @@ void pre_encoder_mode_change(){
timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000;
rtcSetTime(&RTCD1, &timespec); rtcSetTime(&RTCD1, &timespec);
} else if (encoder_mode == ENC_MODE_BACKLIGHT){ } else if (encoder_mode == ENC_MODE_BACKLIGHT){
save_backlight_config_to_eeprom(); backlight_config_save();
} }
} }
@ -221,7 +221,7 @@ uint16_t handle_encoder_press(){
uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){
#ifdef DYNAMIC_KEYMAP_ENABLE #ifdef DYNAMIC_KEYMAP_ENABLE
void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2));
//big endian //big endian
uint16_t keycode = eeprom_read_byte(addr) << 8; uint16_t keycode = eeprom_read_byte(addr) << 8;
keycode |= eeprom_read_byte(addr + 1); keycode |= eeprom_read_byte(addr + 1);
@ -233,7 +233,7 @@ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){
void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){
#ifdef DYNAMIC_KEYMAP_ENABLE #ifdef DYNAMIC_KEYMAP_ENABLE
void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2));
eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); eeprom_update_byte(addr, (uint8_t)(new_code >> 8));
eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF));
#endif #endif

View File

@ -58,25 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PIN_WS2812 15 #define PIN_WS2812 15
#define WS2812_SPI SPID2 #define WS2812_SPI SPID2
// EEPROM usage // Backlight config starts after VIA's EEPROM usage,
// TODO: refactor with new user EEPROM code (coming soon) // dynamic keymaps start after this.
#define EEPROM_MAGIC 0x451F #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC_ADDR 40
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x02
#define EEPROM_VERSION_ADDR 42
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
// start + layer * rows * col * 2
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
#define EEPROM_CUSTOM_BACKLIGHT 684
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -10,11 +10,10 @@
#include "raw_hid.h" #include "raw_hid.h"
#include "dynamic_keymap.h" #include "dynamic_keymap.h"
#include "tmk_core/common/eeprom.h" #include "tmk_core/common/eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
// HACK #include "via.h"
#include "keyboards/wilba_tech/via_api.h" // Temporary hack #define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR)
#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack
backlight_config_t kb_backlight_config = { backlight_config_t kb_backlight_config = {
.enable = true, .enable = true,
@ -22,61 +21,29 @@ backlight_config_t kb_backlight_config = {
.level = BACKLIGHT_LEVELS .level = BACKLIGHT_LEVELS
}; };
bool eeprom_is_valid(void) void backlight_config_save(){
{
return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC &&
eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION);
}
void eeprom_set_valid(bool valid)
{
eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF);
eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF);
}
void eeprom_reset(void)
{
eeprom_set_valid(false);
eeconfig_disable();
}
void save_backlight_config_to_eeprom(){
eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw);
} }
void load_custom_config(){ void backlight_config_load(){
kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT);
} }
#ifdef DYNAMIC_KEYMAP_ENABLE // Called from via_init() if VIA_ENABLE
void dynamic_keymap_custom_reset(void){ // Called from matrix_init_kb() if not VIA_ENABLE
void *p = (void*)(EEPROM_CUSTOM_BACKLIGHT); void via_init_kb(void)
void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR);
while ( p != end ) {
eeprom_update_byte(p, 0);
++p;
}
}
#endif
void eeprom_init_kb(void)
{ {
// If the EEPROM has the magic, the data is good. // If the EEPROM has the magic, the data is good.
// OK to load from EEPROM. // OK to load from EEPROM.
if (eeprom_is_valid()) { if (via_eeprom_is_valid()) {
load_custom_config(); backlight_config_load();
} else { } else {
#ifdef DYNAMIC_KEYMAP_ENABLE // If the EEPROM has not been saved before, or is out of date,
// This resets the keymaps in EEPROM to what is in flash. // save the default values to the EEPROM. Default values
dynamic_keymap_reset(); // come from construction of the backlight_config instance.
// This resets the macros in EEPROM to nothing. backlight_config_save();
dynamic_keymap_macro_reset();
// Reset the custom stuff // DO NOT set EEPROM valid here, let caller do this
dynamic_keymap_custom_reset();
#endif
// Save the magic number last, in case saving was interrupted
save_backlight_config_to_eeprom();
eeprom_set_valid(true);
} }
} }
@ -84,7 +51,13 @@ __attribute__ ((weak))
void matrix_init_board(void); void matrix_init_board(void);
void matrix_init_kb(void){ void matrix_init_kb(void){
eeprom_init_kb(); // If VIA is disabled, we still need to load backlight settings.
// Call via_init_kb() the same way as via_init(), with setting
// EEPROM valid afterwards.
#ifndef VIA_ENABLE
via_init_kb();
via_eeprom_set_valid(true);
#endif // VIA_ENABLE
/* MOSI pin*/ /* MOSI pin*/
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0));
@ -112,7 +85,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
kb_backlight_config.level = BACKLIGHT_LEVELS; kb_backlight_config.level = BACKLIGHT_LEVELS;
} }
backlight_set(kb_backlight_config.level); backlight_set(kb_backlight_config.level);
save_backlight_config_to_eeprom(); backlight_config_save();
} }
return false; return false;
case BL_TOGG: case BL_TOGG:
@ -123,7 +96,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
} else { } else {
backlight_set(0); backlight_set(0);
} }
save_backlight_config_to_eeprom(); backlight_config_save();
} }
return false; return false;
@ -135,168 +108,71 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
kb_backlight_config.level = kb_backlight_config.level - 1; kb_backlight_config.level = kb_backlight_config.level - 1;
} }
backlight_set(kb_backlight_config.level); backlight_set(kb_backlight_config.level);
save_backlight_config_to_eeprom(); backlight_config_save();
} }
return false; return false;
case BL_BRTG: case BL_BRTG:
if (record->event.pressed) { if (record->event.pressed) {
kb_backlight_config.breathing = !kb_backlight_config.breathing; kb_backlight_config.breathing = !kb_backlight_config.breathing;
breathing_toggle(); breathing_toggle();
save_backlight_config_to_eeprom(); backlight_config_save();
} }
return false; return false;
default: default:
break; break;
} }
#ifdef DYNAMIC_KEYMAP_ENABLE
// Handle macros
if (record->event.pressed) {
if ( keycode >= MACRO00 && keycode <= MACRO15 )
{
uint8_t id = keycode - MACRO00;
dynamic_keymap_macro_send(id);
return false;
}
}
#endif //DYNAMIC_KEYMAP_ENABLE
return process_record_user(keycode, record);; return process_record_user(keycode, record);;
} }
// Start Dynamic Keymap code
#ifdef RAW_ENABLE
void raw_hid_receive( uint8_t *data, uint8_t length )
//
// In the case of VIA being disabled, we still need to check if
// keyboard level EEPROM memory is valid before loading.
// Thus these are copies of the same functions in VIA, since
// the backlight settings reuse VIA's EEPROM magic/version,
// and the ones in via.c won't be compiled in.
//
// Yes, this is sub-optimal, and is only here for completeness
// (i.e. catering to the 1% of people that want wilba.tech LED bling
// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA).
//
#ifndef VIA_ENABLE
bool via_eeprom_is_valid(void)
{ {
uint8_t *command_id = &(data[0]); char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
uint8_t *command_data = &(data[1]); uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
switch ( *command_id ) uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
{ uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
case id_get_protocol_version:
{
command_data[0] = PROTOCOL_VERSION >> 8;
command_data[1] = PROTOCOL_VERSION & 0xFF;
break;
}
case id_get_keyboard_value:
{
switch( command_data[0])
{
case id_uptime:
{
uint32_t value = timer_read32();
command_data[1] = (value >> 24 ) & 0xFF;
command_data[2] = (value >> 16 ) & 0xFF;
command_data[3] = (value >> 8 ) & 0xFF;
command_data[4] = value & 0xFF;
break;
}
default:
{
*command_id = id_unhandled;
break;
}
}
break;
}
#ifdef DYNAMIC_KEYMAP_ENABLE
case id_dynamic_keymap_get_keycode:
{
uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] );
command_data[3] = keycode >> 8;
command_data[4] = keycode & 0xFF;
break;
}
case id_dynamic_keymap_set_keycode:
{
dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] );
break;
}
case id_dynamic_keymap_reset:
{
dynamic_keymap_reset();
break;
}
case id_dynamic_keymap_macro_get_count:
{
command_data[0] = dynamic_keymap_macro_get_count();
break;
}
case id_dynamic_keymap_macro_get_buffer_size:
{
uint16_t size = dynamic_keymap_macro_get_buffer_size();
command_data[0] = size >> 8;
command_data[1] = size & 0xFF;
break;
}
case id_dynamic_keymap_macro_get_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] );
break;
}
case id_dynamic_keymap_macro_set_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] );
break;
}
case id_dynamic_keymap_macro_reset:
{
dynamic_keymap_macro_reset();
break;
}
case id_dynamic_keymap_get_layer_count:
{
command_data[0] = dynamic_keymap_get_layer_count();
break;
}
case id_dynamic_keymap_get_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_get_buffer( offset, size, &command_data[3] );
break;
}
case id_dynamic_keymap_set_buffer:
{
uint16_t offset = ( command_data[0] << 8 ) | command_data[1];
uint16_t size = command_data[2]; // size <= 28
dynamic_keymap_set_buffer( offset, size, &command_data[3] );
break;
}
#endif // DYNAMIC_KEYMAP_ENABLE
case id_eeprom_reset:
{
eeprom_reset();
break;
}
case id_bootloader_jump:
{
// Need to send data back before the jump
// Informs host that the command is handled
raw_hid_send( data, length );
// Give host time to read it
wait_ms(100);
bootloader_jump();
break;
}
default:
{
// Unhandled message.
*command_id = id_unhandled;
break;
}
}
// Return same buffer with values changed
raw_hid_send( data, length );
return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 &&
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 &&
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 );
} }
#endif // Sets VIA/keyboard level usage of EEPROM to valid/invalid
// Keyboard level code (eg. via_init_kb()) should not call this
void via_eeprom_set_valid(bool valid)
{
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF);
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF);
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF);
}
void via_eeprom_reset(void)
{
// Set the VIA specific EEPROM state as invalid.
via_eeprom_set_valid(false);
// Set the TMK/QMK EEPROM state as invalid.
eeconfig_disable();
}
#endif // VIA_ENABLE

View File

@ -19,5 +19,5 @@ void backlight_set(uint8_t level);
bool is_breathing(void); bool is_breathing(void);
void breathing_enable(void); void breathing_enable(void);
void breathing_disable(void); void breathing_disable(void);
void load_custom_config(void); void backlight_config_load(void);
void save_backlight_config_to_eeprom(void); void backlight_config_save(void);

View File

@ -58,25 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PIN_WS2812 15 #define PIN_WS2812 15
#define WS2812_SPI SPID2 #define WS2812_SPI SPID2
// EEPROM usage // Backlight config starts after VIA's EEPROM usage,
// TODO: refactor with new user EEPROM code (coming soon) // dynamic keymaps start after this.
#define EEPROM_MAGIC 0x451F #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC_ADDR 40
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x02
#define EEPROM_VERSION_ADDR 42
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (43+(4*4*15*2)) = (43+480) = 523
// start + layer * rows * col * 2c
#define DYNAMIC_KEYMAP_EEPROM_ADDR 43
#define EEPROM_CUSTOM_BACKLIGHT 523
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 524
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
/* /*
* Feature disable options * Feature disable options

View File

@ -50,24 +50,6 @@
#define DRIVER_2_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#if defined(RAW_ENABLE) #if defined(VIA_ENABLE)
//VIA # define DYNAMIC_KEYMAP_LAYER_COUNT 2
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 391 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
#endif #endif

View File

@ -1,39 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = yes # Use RGB bottom light
RGB_MATRIX_ENABLE = yes # Use RGB matrix
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CUSTOM_MATRIX = yes
SRC += matrix.c keyboards/wilba_tech/wt_main.c

View File

@ -49,23 +49,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,86 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
# This is the VIA magic
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c

View File

@ -134,21 +134,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
// TODO: refactor with new user EEPROM code (coming soon) // Backlight config starts after VIA's EEPROM usage,
#define EEPROM_MAGIC 0x451F // dynamic keymaps start after this.
#define EEPROM_MAGIC_ADDR 34 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Backlight config starts after EEPROM version
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
// Dynamic keymap starts after backlight config (37+32)
#define DYNAMIC_KEYMAP_EEPROM_ADDR 69
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (69+(4*5*14*2)) = (69+560)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 629
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -21,8 +21,6 @@ AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes #SERIAL_LINK_ENABLE = yes
RAW_ENABLE = no
DYNAMIC_KEYMAP_ENABLE = no
CIE1931_CURVE = yes CIE1931_CURVE = yes
LAYOUTS = 60_ansi 60_iso LAYOUTS = 60_ansi 60_iso

View File

@ -19,7 +19,7 @@
#include "quantum.h" #include "quantum.h"
#include "../../wilba_tech/wt_rgb_backlight_keycodes.h" #include "../../wilba_tech/wt_rgb_backlight_keycodes.h"
#include "../../wilba_tech/via_keycodes.h" #include "via.h"
// This a shortcut to help you visually see your layout. // This a shortcut to help you visually see your layout.

View File

@ -148,23 +148,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -0,0 +1,31 @@
/* Copyright 2019 Ryota Goto
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ENT
),
[1] = LAYOUT(
KC_TRNS
),
[2] = LAYOUT(
KC_TRNS
),
[3] = LAYOUT(
KC_TRNS
),
};

View File

@ -0,0 +1 @@
# The VIA keymap for is0

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -13,7 +13,7 @@
#endif #endif
#include "quantum.h" #include "quantum.h"
#include "../../wilba_tech/via_keycodes.h" #include "via.h"
// Used to create a keymap using only KC_ prefixed keys // Used to create a keymap using only KC_ prefixed keys
#define LAYOUT_kc( \ #define LAYOUT_kc( \

View File

@ -1,8 +1,3 @@
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes
MOUSEKEY_ENABLE = yes MOUSEKEY_ENABLE = yes
# VIA Support - Comment these 3 lines out to disable
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
# SRC += keyboards/wilba_tech/wt_main.c

View File

@ -1,20 +0,0 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define RGBLIGHT_ANIMATIONS

View File

@ -1,7 +1 @@
RGBLIGHT_ENABLE = yes VIA_ENABLE = yes
BACKLIGHT_ENABLE = yes
# VIA Support - Comment these 3 lines out to disable
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c

View File

@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */ /* ws2812 RGB LED */
#define RGB_DI_PIN D3 #define RGB_DI_PIN D3
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */ /* ws2812 RGB LED */
#define RGB_DI_PIN D3 #define RGB_DI_PIN D3
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */ /* ws2812 RGB LED */
#define RGB_DI_PIN D3 #define RGB_DI_PIN D3
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -69,23 +69,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN F7 #define RGB_DI_PIN F7
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define RGBLED_SPLIT { 6, 6 } #define RGBLED_SPLIT { 6, 6 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -73,23 +73,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D6 #define RGB_DI_PIN D6
#define RGBLED_NUM 12 // Number of LEDs #define RGBLED_NUM 12 // Number of LEDs
#define RGBLED_SPLIT { 6, 6 } #define RGBLED_SPLIT { 6, 6 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -3,8 +3,8 @@
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x4b4b // "KK"
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x0001
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER TheRoyalSweatshirt #define MANUFACTURER TheRoyalSweatshirt
#define PRODUCT romac #define PRODUCT romac

View File

@ -0,0 +1,44 @@
/* Copyright 2018 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, \
MO(1), KC_KP_0, KC_KP_DOT \
),
[1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS \
),
[2] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS \
),
[3] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS \
)
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -47,24 +47,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define QMK_ESC_OUTPUT D2 // usually COL #define QMK_ESC_OUTPUT D2 // usually COL
#define QMK_ESC_INPUT B4 // usually ROW #define QMK_ESC_INPUT B4 // usually ROW
//VIA
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -16,8 +16,7 @@
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
RAW_ENABLE = no
DYNAMIC_KEYMAP_ENABLE = no

View File

@ -1,5 +1 @@
# rules.mk overrides to enable VIA VIA_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -134,21 +134,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
// TODO: refactor with new user EEPROM code (coming soon) // Backlight config starts after VIA's EEPROM usage,
#define EEPROM_MAGIC 0x451F // dynamic keymaps start after this.
#define EEPROM_MAGIC_ADDR 34 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Backlight config starts after EEPROM version
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
// Dynamic keymap starts after backlight config (37+32)
#define DYNAMIC_KEYMAP_EEPROM_ADDR 69
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,67 +1 @@
# project specific files VIA_ENABLE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
## chip/board settings
# the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F3xx
# Linker script to use
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes

View File

@ -19,7 +19,7 @@
#include "quantum.h" #include "quantum.h"
#include "../wilba_tech/wt_rgb_backlight_keycodes.h" #include "../wilba_tech/wt_rgb_backlight_keycodes.h"
#include "../wilba_tech/via_keycodes.h" #include "via.h"
// This a shortcut to help you visually see your layout. // This a shortcut to help you visually see your layout.

View File

@ -21,8 +21,6 @@ AUDIO_ENABLE = no # Audio output on port C6
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
#SERIAL_LINK_ENABLE = yes #SERIAL_LINK_ENABLE = yes
RAW_ENABLE = no
DYNAMIC_KEYMAP_ENABLE = no
CIE1931_CURVE = yes CIE1931_CURVE = yes
LAYOUTS = 65_ansi LAYOUTS = 65_ansi

View File

@ -50,23 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*13*4*2)) = (37+416)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 453
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 571 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,85 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
# This is the VIA magic
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c

View File

@ -58,29 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PIN_WS2812 15 #define PIN_WS2812 15
#define WS2812_SPI SPID2 #define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
// EEPROM usage // dynamic keymaps start after this.
// TODO: refactor with new user EEPROM code (coming soon) #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 32
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x01
#define EEPROM_VERSION_ADDR 34
#define EEPROM_CUSTOM_BACKLIGHT 804
#undef EEPROM_MAGIC_ADDR
#define EEPROM_MAGIC_ADDR 34
#undef EEPROM_VERSION_ADDR
#define EEPROM_VERSION_ADDR 36
#undef RGB_BACKLIGHT_CONFIG_EEPROM_ADDR
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
#undef DYNAMIC_KEYMAP_EEPROM_ADDR
#define DYNAMIC_KEYMAP_EEPROM_ADDR 68
#undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 66
/* /*
* Feature disable options * Feature disable options

View File

@ -51,7 +51,4 @@ CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave

View File

@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x5343 // "SC"
#define PRODUCT_ID 0x0000 #define PRODUCT_ID 0x0001
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Space City Keyboards #define MANUFACTURER Space City Keyboards
#define PRODUCT OSA #define PRODUCT OSA

View File

@ -0,0 +1,49 @@
/* Copyright 2019 jrfhoutx
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_DEL, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL
),
[1] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};

View File

@ -0,0 +1 @@
# The VIA keymap for OSA

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
MOUSEKEY_ENABLE = no

View File

@ -47,23 +47,3 @@
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,76 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = caterina
# Boot Section Size in *bytes*
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
# This is the VIA magic
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c
LAYOUTS = ortho_5x4 numpad_5x4

View File

@ -117,26 +117,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* useful if your keyboard/keypad is missing keys and you want magic key support. * useful if your keyboard/keypad is missing keys and you want magic key support.
* *
*/ */
//dynamic keymap and via support
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -1,69 +1 @@
# MCU name VIA_ENABLE = yes
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150)
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
#add files needed for via
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
SRC += keyboards/wilba_tech/wt_main.c

View File

@ -18,7 +18,7 @@
#include "config_common.h" #include "config_common.h"
// USB Device descriptor parameter // USB Device descriptor parameter
#define VENDOR_ID 0x5241 // "RW" #define VENDOR_ID 0x5241 // "RA"
#define PRODUCT_ID 0x4B59 // "KY" #define PRODUCT_ID 0x4B59 // "KY"
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER RAMA WORKS #define MANUFACTURER RAMA WORKS
@ -119,24 +119,6 @@
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
// EEPROM usage #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Backlight config starts after EEPROM version
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
// Dynamic keymap starts after backlight config (37+31)
#define DYNAMIC_KEYMAP_EEPROM_ADDR 68
// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT),
// Fn1 Layer
[1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS,
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn2 Layer
[2] = LAYOUT_all(
KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn3 Layer
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -18,7 +18,7 @@
#include "quantum.h" #include "quantum.h"
#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h"
#include "keyboards/wilba_tech/via_keycodes.h" #include "via.h"
#define ____ KC_NO #define ____ KC_NO

View File

@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes CIE1931_CURVE = yes
# project specific files # project specific files

View File

@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x5241 // "RW" #define VENDOR_ID 0x5241 // "RA"
#define PRODUCT_ID 0x00AB // 10-B #define PRODUCT_ID 0x00AB // 10-B
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER RAMA WORKS #define MANUFACTURER RAMA WORKS
@ -180,25 +179,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1 //#define MIDI_TONE_KEYCODE_OCTAVES 1
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
// Dynamic macro starts after dynamic keymaps (37+(4*10*2)) = (37+80)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 117
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 907
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
#endif

View File

@ -19,6 +19,7 @@
#include "../../config.h" #include "../../config.h"
#undef VIA_ENABLE
#undef RAW_ENABLE #undef RAW_ENABLE
#undef DYNAMIC_KEYMAP_ENABLE #undef DYNAMIC_KEYMAP_ENABLE

View File

@ -0,0 +1,13 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 ),
LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS )
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
@ -29,9 +29,3 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
# project specific files
SRC = keyboards/wilba_tech/wt_main.c

View File

@ -18,7 +18,7 @@
#include "config_common.h" #include "config_common.h"
// USB Device descriptor parameter // USB Device descriptor parameter
#define VENDOR_ID 0x5241 // "RW" #define VENDOR_ID 0x5241 // "RA"
#define PRODUCT_ID 0x060A // 60-A #define PRODUCT_ID 0x060A // 60-A
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER RAMA WORKS #define MANUFACTURER RAMA WORKS
@ -116,24 +116,6 @@
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 4 // Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
// EEPROM usage #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// Backlight config starts after EEPROM version
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
// Dynamic keymap starts after backlight config (37+31)
#define DYNAMIC_KEYMAP_EEPROM_ADDR 68
// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -0,0 +1,40 @@
// M60-A layout
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_60_hhkb(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13,
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23),
// Fn1 Layer
[1] = LAYOUT_60_hhkb(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn2 Layer
[2] = LAYOUT_60_hhkb(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn3 Layer (zeal60 Configuration)
[3] = LAYOUT_60_hhkb(
KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -17,7 +17,7 @@
#include "quantum.h" #include "quantum.h"
#include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h"
#include "keyboards/wilba_tech/via_keycodes.h" #include "via.h"
#define XXX KC_NO #define XXX KC_NO

View File

@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
CIE1931_CURVE = yes CIE1931_CURVE = yes
LAYOUTS = 60_hhkb LAYOUTS = 60_hhkb

View File

@ -18,7 +18,7 @@
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x5241 // "RW" #define VENDOR_ID 0x5241 // "RA"
#define PRODUCT_ID 0x006A // 6-A #define PRODUCT_ID 0x006A // 6-A
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER RAMA WORKS #define MANUFACTURER RAMA WORKS
@ -103,27 +103,9 @@
#define RGB_BACKLIGHT_ENABLED 0 #define RGB_BACKLIGHT_ENABLED 0
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
#define EEPROM_VERSION_ADDR 36
// NOTE: M6-A doesn't use RGB backlight, but we keep this // NOTE: M6-A doesn't use RGB backlight, but we keep this
// consistent with M6-B which does. // consistent with M6-B which does.
// Backlight config starts after EEPROM version // Backlight config starts after VIA's EEPROM usage,
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 // dynamic keymaps start after this.
// Dynamic keymap starts after backlight config (37+43) #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43
#define DYNAMIC_KEYMAP_EEPROM_ADDR 80
// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896
#define DYNAMIC_KEYMAP_MACRO_COUNT 16

View File

@ -0,0 +1,16 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6),
LAYOUT(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
LAYOUT(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
LAYOUT(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) };

Some files were not shown because too many files have changed in this diff Show More