aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilba6582 <Jason.S.Williams@gmail.com>2018-12-13 19:33:04 +1100
committerDrashna Jaelre <drashna@live.com>2018-12-13 08:18:49 -0800
commitcc45f62d757f56c2fa9be92685f83f127b63b509 (patch)
treec89edebf208f3a466a807e0843699717c241b9ad
parent24b17c96191d0791110ef6b51fa54f74d91075de (diff)
downloadqmk_firmware-cc45f62d757f56c2fa9be92685f83f127b63b509.tar.gz
qmk_firmware-cc45f62d757f56c2fa9be92685f83f127b63b509.zip
Added Dynamic Keymaps to M10-B
-rw-r--r--keyboards/rama/m10_b/config.h24
-rw-r--r--keyboards/rama/m10_b/keymaps/default/keymap.c18
-rw-r--r--keyboards/rama/m10_b/keymaps/knops/config.h3
-rw-r--r--keyboards/rama/m10_b/m10_b.c31
-rw-r--r--keyboards/rama/m10_b/rules.mk42
-rw-r--r--keyboards/rama/u80_a/config.h2
-rw-r--r--keyboards/rama/u80_a/rules.mk1
-rw-r--r--keyboards/wilba_tech/wt60_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt65_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt80_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt_main.c6
11 files changed, 62 insertions, 71 deletions
diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h
index de626dba5..144f88d56 100644
--- a/keyboards/rama/m10_b/config.h
+++ b/keyboards/rama/m10_b/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
27#define MANUFACTURER RAMA.WORKS 27#define MANUFACTURER RAMA.WORKS
28#define PRODUCT RAMA M10-B 28#define PRODUCT RAMA M10-B
29#define DESCRIPTION RAMA M10-B Macropad 29#define DESCRIPTION RAMA M10-B
30 30
31/* key matrix size */ 31/* key matrix size */
32#define MATRIX_ROWS 1 32#define MATRIX_ROWS 1
@@ -186,4 +186,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
186/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 186/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
187//#define MIDI_TONE_KEYCODE_OCTAVES 1 187//#define MIDI_TONE_KEYCODE_OCTAVES 1
188 188
189//#define WT_MONO_BACKLIGHT
190
191#define DYNAMIC_KEYMAP_LAYER_COUNT 4
192
193// EEPROM usage
194
195// TODO: refactor with new user EEPROM code (coming soon)
196#define EEPROM_MAGIC 0x451F
197#define EEPROM_MAGIC_ADDR 32
198// Bump this every time we change what we store
199// This will automatically reset the EEPROM with defaults
200// and avoid loading invalid data from the EEPROM
201#define EEPROM_VERSION 0x08
202#define EEPROM_VERSION_ADDR 34
203
204// Dynamic keymap starts after EEPROM version
205#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
206// Dynamic macro starts after dynamic keymaps (35+(4*10*2)) = (35+80)
207#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 115
208#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 909
209#define DYNAMIC_KEYMAP_MACRO_COUNT 16
210
189#endif 211#endif
diff --git a/keyboards/rama/m10_b/keymaps/default/keymap.c b/keyboards/rama/m10_b/keymaps/default/keymap.c
index 8002b8c7c..c307bcb2a 100644
--- a/keyboards/rama/m10_b/keymaps/default/keymap.c
+++ b/keyboards/rama/m10_b/keymaps/default/keymap.c
@@ -6,21 +6,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6 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 ) 6 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 )
7 7
8}; 8};
9
10const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
11{
12 return MACRO_NONE;
13}
14
15void matrix_init_user(void)
16{
17}
18
19void matrix_scan_user(void)
20{
21}
22
23bool process_record_user(uint16_t keycode, keyrecord_t *record)
24{
25 return true;
26}
diff --git a/keyboards/rama/m10_b/keymaps/knops/config.h b/keyboards/rama/m10_b/keymaps/knops/config.h
index d150575c1..7c3ec9601 100644
--- a/keyboards/rama/m10_b/keymaps/knops/config.h
+++ b/keyboards/rama/m10_b/keymaps/knops/config.h
@@ -19,6 +19,7 @@
19 19
20#include "../../config.h" 20#include "../../config.h"
21 21
22// place overrides here 22#undef RAW_ENABLE
23#undef DYNAMIC_KEYMAP_ENABLE
23 24
24#endif 25#endif
diff --git a/keyboards/rama/m10_b/m10_b.c b/keyboards/rama/m10_b/m10_b.c
index f43f6e2a1..ccff6d62c 100644
--- a/keyboards/rama/m10_b/m10_b.c
+++ b/keyboards/rama/m10_b/m10_b.c
@@ -1,4 +1,4 @@
1/* Copyright 2018 Wilba 1/* Copyright 2018 Jason Williams (Wilba)
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
@@ -13,32 +13,5 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include "m10_b.h"
17/*
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21 16
22 matrix_init_user(); 17// Nothing to see here, move along... ;-)
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
44*/
diff --git a/keyboards/rama/m10_b/rules.mk b/keyboards/rama/m10_b/rules.mk
index 24df4632d..70258b9ea 100644
--- a/keyboards/rama/m10_b/rules.mk
+++ b/keyboards/rama/m10_b/rules.mk
@@ -1,5 +1,7 @@
1# project specific files
2SRC = keyboards/wilba_tech/wt_main.c
3
1# MCU name 4# MCU name
2#MCU = at90usb1286
3MCU = atmega32u4 5MCU = atmega32u4
4 6
5# Processor frequency. 7# Processor frequency.
@@ -39,30 +41,28 @@ F_USB = $(F_CPU)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40 42
41 43
42# Boot Section Size in *bytes* 44# Boot Section
43# Teensy halfKay 512 45BOOTLOADER = atmel-dfu
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49 46
50 47
51# Build Options 48# Build Options
52# change yes to no to disable 49# change yes to no to disable
53# 50#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) 51BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) 52MOUSEKEY_ENABLE = no # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) 53EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400) 54CONSOLE_ENABLE = no # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration 55COMMAND_ENABLE = no # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 56# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 57SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 58# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover 59NKRO_ENABLE = yes # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default 60BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) 61MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
65UNICODE_ENABLE ?= no # Unicode 62UNICODE_ENABLE = no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID 63BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6 64AUDIO_ENABLE = no # Audio output on port C6
68FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches 65FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
66
67RAW_ENABLE = yes
68DYNAMIC_KEYMAP_ENABLE = yes
diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h
index b5dc27598..c733601e1 100644
--- a/keyboards/rama/u80_a/config.h
+++ b/keyboards/rama/u80_a/config.h
@@ -185,6 +185,8 @@
185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
186//#define MIDI_TONE_KEYCODE_OCTAVES 1 186//#define MIDI_TONE_KEYCODE_OCTAVES 1
187 187
188#define WT_MONO_BACKLIGHT
189
188#define DYNAMIC_KEYMAP_LAYER_COUNT 4 190#define DYNAMIC_KEYMAP_LAYER_COUNT 4
189 191
190// EEPROM usage 192// EEPROM usage
diff --git a/keyboards/rama/u80_a/rules.mk b/keyboards/rama/u80_a/rules.mk
index 67b04e350..54479529b 100644
--- a/keyboards/rama/u80_a/rules.mk
+++ b/keyboards/rama/u80_a/rules.mk
@@ -69,4 +69,3 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
69 69
70RAW_ENABLE = yes 70RAW_ENABLE = yes
71DYNAMIC_KEYMAP_ENABLE = yes 71DYNAMIC_KEYMAP_ENABLE = yes
72CIE1931_CURVE = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h
index 8c18582a8..9eff7d7f1 100644
--- a/keyboards/wilba_tech/wt60_a/config.h
+++ b/keyboards/wilba_tech/wt60_a/config.h
@@ -185,6 +185,8 @@
185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
186//#define MIDI_TONE_KEYCODE_OCTAVES 1 186//#define MIDI_TONE_KEYCODE_OCTAVES 1
187 187
188#define WT_MONO_BACKLIGHT
189
188#define DYNAMIC_KEYMAP_LAYER_COUNT 4 190#define DYNAMIC_KEYMAP_LAYER_COUNT 4
189 191
190// EEPROM usage 192// EEPROM usage
diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h
index 88e902353..88366edc0 100644
--- a/keyboards/wilba_tech/wt65_a/config.h
+++ b/keyboards/wilba_tech/wt65_a/config.h
@@ -185,6 +185,8 @@
185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
186//#define MIDI_TONE_KEYCODE_OCTAVES 1 186//#define MIDI_TONE_KEYCODE_OCTAVES 1
187 187
188#define WT_MONO_BACKLIGHT
189
188#define DYNAMIC_KEYMAP_LAYER_COUNT 4 190#define DYNAMIC_KEYMAP_LAYER_COUNT 4
189 191
190// EEPROM usage 192// EEPROM usage
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h
index ca03c366e..7c15e4a5b 100644
--- a/keyboards/wilba_tech/wt80_a/config.h
+++ b/keyboards/wilba_tech/wt80_a/config.h
@@ -185,6 +185,8 @@
185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 185/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
186//#define MIDI_TONE_KEYCODE_OCTAVES 1 186//#define MIDI_TONE_KEYCODE_OCTAVES 1
187 187
188#define WT_MONO_BACKLIGHT
189
188#define DYNAMIC_KEYMAP_LAYER_COUNT 4 190#define DYNAMIC_KEYMAP_LAYER_COUNT 4
189 191
190// EEPROM usage 192// EEPROM usage
diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c
index de6d7b92c..7a63ab5b7 100644
--- a/keyboards/wilba_tech/wt_main.c
+++ b/keyboards/wilba_tech/wt_main.c
@@ -15,7 +15,9 @@
15 */ 15 */
16 16
17#include "quantum.h" 17#include "quantum.h"
18#ifdef WT_MONO_BACKLIGHT
18#include "keyboards/wilba_tech/wt_mono_backlight.h" 19#include "keyboards/wilba_tech/wt_mono_backlight.h"
20#endif
19#include "keyboards/zeal60/zeal60_api.h" // Temporary hack 21#include "keyboards/zeal60/zeal60_api.h" // Temporary hack
20#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack 22#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack
21 23
@@ -194,11 +196,13 @@ void main_init(void)
194 eeprom_set_valid(true); 196 eeprom_set_valid(true);
195 } 197 }
196 198
199#ifdef WT_MONO_BACKLIGHT
197 // Initialize LED drivers for backlight. 200 // Initialize LED drivers for backlight.
198 backlight_init_drivers(); 201 backlight_init_drivers();
199 202
200 backlight_timer_init(); 203 backlight_timer_init();
201 backlight_timer_enable(); 204 backlight_timer_enable();
205#endif
202} 206}
203 207
204void bootmagic_lite(void) 208void bootmagic_lite(void)
@@ -230,8 +234,10 @@ void matrix_init_kb(void)
230 234
231void matrix_scan_kb(void) 235void matrix_scan_kb(void)
232{ 236{
237#ifdef WT_MONO_BACKLIGHT
233 // This only updates the LED driver buffers if something has changed. 238 // This only updates the LED driver buffers if something has changed.
234 backlight_update_pwm_buffers(); 239 backlight_update_pwm_buffers();
240#endif
235 matrix_scan_user(); 241 matrix_scan_user();
236} 242}
237 243