aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nk65
diff options
context:
space:
mode:
authorWilba <Jason.S.Williams@gmail.com>2020-01-04 07:52:00 +1100
committerDrashna Jaelre <drashna@live.com>2020-01-03 12:52:00 -0800
commit320822d75b785401809f45007320e6fb6885b3fd (patch)
treec511d49a48b953ac29ffb4a51ac928319eb9fde4 /keyboards/nk65
parentb36259566546eb884cc241bcfadb671051e5e75e (diff)
downloadqmk_firmware-320822d75b785401809f45007320e6fb6885b3fd.tar.gz
qmk_firmware-320822d75b785401809f45007320e6fb6885b3fd.zip
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
Diffstat (limited to 'keyboards/nk65')
-rwxr-xr-xkeyboards/nk65/config.h21
-rwxr-xr-xkeyboards/nk65/keymaps/default_via/rules.mk68
-rwxr-xr-xkeyboards/nk65/nk65.h2
-rwxr-xr-xkeyboards/nk65/rules.mk2
4 files changed, 5 insertions, 88 deletions
diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h
index 51e101cde..423714c54 100755
--- a/keyboards/nk65/config.h
+++ b/keyboards/nk65/config.h
@@ -134,21 +134,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
134#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } 134#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
135#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } 135#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
136 136
137// TODO: refactor with new user EEPROM code (coming soon) 137// Backlight config starts after VIA's EEPROM usage,
138#define EEPROM_MAGIC 0x451F 138// dynamic keymaps start after this.
139#define EEPROM_MAGIC_ADDR 34 139#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
140// Bump this every time we change what we store
141// This will automatically reset the EEPROM with defaults
142// and avoid loading invalid data from the EEPROM
143#define EEPROM_VERSION 0x08
144#define EEPROM_VERSION_ADDR 36
145
146// Backlight config starts after EEPROM version
147#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
148// Dynamic keymap starts after backlight config (37+32)
149#define DYNAMIC_KEYMAP_EEPROM_ADDR 69
150#define DYNAMIC_KEYMAP_LAYER_COUNT 4
151// Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600)
152#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669
153#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
154#define DYNAMIC_KEYMAP_MACRO_COUNT 16
diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk
index b8311f5e7..1e5b99807 100755
--- a/keyboards/nk65/keymaps/default_via/rules.mk
+++ b/keyboards/nk65/keymaps/default_via/rules.mk
@@ -1,67 +1 @@
1# project specific files VIA_ENABLE = yes
2SRC = keyboards/wilba_tech/wt_main.c \
3 keyboards/wilba_tech/wt_rgb_backlight.c \
4 drivers/issi/is31fl3733.c \
5 quantum/color.c \
6 drivers/arm/i2c_master.c
7
8## chip/board settings
9# the next two should match the directories in
10# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
11MCU_FAMILY = STM32
12MCU_SERIES = STM32F3xx
13
14# Linker script to use
15# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
16# or <this_dir>/ld/
17MCU_LDSCRIPT = STM32F303xC
18
19# Startup code to use
20# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
21MCU_STARTUP = stm32f3xx
22
23# Board: it should exist either in <chibios>/os/hal/boards/
24# or <this_dir>/boards
25BOARD = GENERIC_STM32_F303XC
26
27# Cortex version
28MCU = cortex-m4
29
30# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
31ARMV = 7
32
33USE_FPU = yes
34
35# Vector table for application
36# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
37# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
38# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
39OPT_DEFS =
40
41# Do not put the microcontroller into power saving mode
42# when we get USB suspend event. We want it to keep updating
43# backlight effects.
44OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
45
46# Options to pass to dfu-util when flashing
47DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
48DFU_SUFFIX_ARGS = -p DF11 -v 0483
49
50# Build Options
51# comment out to disable the options.
52#
53BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
54BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
55MOUSEKEY_ENABLE = yes # Mouse keys
56EXTRAKEY_ENABLE = yes # Audio control and System control
57CONSOLE_ENABLE = no # Console for debug
58COMMAND_ENABLE = no # Commands for debug and configuration
59SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
60NKRO_ENABLE = yes # USB Nkey Rollover
61AUDIO_ENABLE = no # Audio output on port C6
62NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
63#SERIAL_LINK_ENABLE = yes
64
65RAW_ENABLE = yes
66DYNAMIC_KEYMAP_ENABLE = yes
67CIE1931_CURVE = yes
diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h
index 49725a7e6..35aca2a64 100755
--- a/keyboards/nk65/nk65.h
+++ b/keyboards/nk65/nk65.h
@@ -19,7 +19,7 @@
19 19
20#include "quantum.h" 20#include "quantum.h"
21#include "../wilba_tech/wt_rgb_backlight_keycodes.h" 21#include "../wilba_tech/wt_rgb_backlight_keycodes.h"
22#include "../wilba_tech/via_keycodes.h" 22#include "via.h"
23 23
24// This a shortcut to help you visually see your layout. 24// This a shortcut to help you visually see your layout.
25 25
diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk
index 0840daf37..01765538a 100755
--- a/keyboards/nk65/rules.mk
+++ b/keyboards/nk65/rules.mk
@@ -21,8 +21,6 @@ AUDIO_ENABLE = no # Audio output on port C6
21NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in 21NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
22#SERIAL_LINK_ENABLE = yes 22#SERIAL_LINK_ENABLE = yes
23 23
24RAW_ENABLE = no
25DYNAMIC_KEYMAP_ENABLE = no
26CIE1931_CURVE = yes 24CIE1931_CURVE = yes
27 25
28LAYOUTS = 65_ansi 26LAYOUTS = 65_ansi