]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Added Dynamic Keymaps to M10-B
authorWilba6582 <Jason.S.Williams@gmail.com>
Thu, 13 Dec 2018 08:33:04 +0000 (19:33 +1100)
committerDrashna Jaelre <drashna@live.com>
Thu, 13 Dec 2018 16:18:49 +0000 (08:18 -0800)
keyboards/rama/m10_b/config.h
keyboards/rama/m10_b/keymaps/default/keymap.c
keyboards/rama/m10_b/keymaps/knops/config.h
keyboards/rama/m10_b/m10_b.c
keyboards/rama/m10_b/rules.mk
keyboards/rama/u80_a/config.h
keyboards/rama/u80_a/rules.mk
keyboards/wilba_tech/wt60_a/config.h
keyboards/wilba_tech/wt65_a/config.h
keyboards/wilba_tech/wt80_a/config.h
keyboards/wilba_tech/wt_main.c

index de626dba53928312ed633d7d84dd35c3902ae7f8..144f88d56d9b37d0868f2420e5905515370f8ea2 100644 (file)
@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define DEVICE_VER      0x0001
 #define MANUFACTURER    RAMA.WORKS
 #define PRODUCT         RAMA M10-B
-#define DESCRIPTION     RAMA M10-B Macropad
+#define DESCRIPTION     RAMA M10-B
 
 /* key matrix size */
 #define MATRIX_ROWS 1
@@ -186,4 +186,26 @@ 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) */
 //#define MIDI_TONE_KEYCODE_OCTAVES 1
 
+//#define WT_MONO_BACKLIGHT
+
+#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 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 0x08
+#define EEPROM_VERSION_ADDR 34
+
+// Dynamic keymap starts after EEPROM version
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
+// Dynamic macro starts after dynamic keymaps (35+(4*10*2)) = (35+80)
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 115
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 909
+#define DYNAMIC_KEYMAP_MACRO_COUNT 16
+
 #endif
index 8002b8c7cda499d042472d343f8140118c902d09..c307bcb2a70167a0817763f9fd09ad4a14798230 100644 (file)
@@ -6,21 +6,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                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 )
 
 };
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-    return MACRO_NONE;
-}
-
-void matrix_init_user(void)
-{
-}
-
-void matrix_scan_user(void)
-{
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record)
-{
-    return true;
-}
index d150575c1a73bfa7f38a2786cacff56b69294ef7..7c3ec9601d6941ec93822d58cb2a06a961482353 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "../../config.h"
 
-// place overrides here
+#undef RAW_ENABLE
+#undef DYNAMIC_KEYMAP_ENABLE
 
 #endif
index f43f6e2a19aba7c80b14cc13b21b1794fb1c016c..ccff6d62c94b5e6b8cd4acfc27fedbad10e3beb4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2018 Wilba
+/* Copyright 2018 Jason Williams (Wilba)
  *
  * 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
  * 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 "m10_b.h"
-/*
-void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
 
-       matrix_init_user();
-}
-
-void matrix_scan_kb(void) {
-       // put your looping keyboard code here
-       // runs every cycle (a lot)
-
-       matrix_scan_user();
-}
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
-       // put your per-action keyboard code here
-       // runs for every action, just before processing by the firmware
-
-       return process_record_user(keycode, record);
-}
-
-void led_set_kb(uint8_t usb_led) {
-       // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
-
-       led_set_user(usb_led);
-}
-*/
+// Nothing to see here, move along... ;-)
index 24df4632dd0296a552420f33b744ce21e8d9137c..70258b9ead634fa5fc01216701d1ec9f224f0b27 100644 (file)
@@ -1,5 +1,7 @@
+# project specific files
+SRC =  keyboards/wilba_tech/wt_main.c
+
 # MCU name
-#MCU = at90usb1286
 MCU = atmega32u4
 
 # Processor frequency.
@@ -39,30 +41,28 @@ F_USB = $(F_CPU)
 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 
 
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
+# Boot Section
+BOOTLOADER = atmel-dfu
 
 
 # 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
+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
+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 ?= yes      # 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
+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
index b5dc27598ab65a926471aa5d6ef9052d0d9be0bb..c733601e171a11e6dba182772d04aff65df14d7d 100644 (file)
 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
 //#define MIDI_TONE_KEYCODE_OCTAVES 1
 
+#define WT_MONO_BACKLIGHT
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index 67b04e350e2cb0fd2b96a6d3e758f30d0d642add..54479529beeb63dbc01966a4e310f88aafa3a1e7 100644 (file)
@@ -69,4 +69,3 @@ FAUXCLICKY_ENABLE = no      # Use buzzer to emulate clicky switches
 
 RAW_ENABLE = yes
 DYNAMIC_KEYMAP_ENABLE = yes
-CIE1931_CURVE = yes
\ No newline at end of file
index 8c18582a88e6ac2bfb0638b33fcd144396550e86..9eff7d7f1bd4cbc352871067028ce51e518cf4c0 100644 (file)
 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
 //#define MIDI_TONE_KEYCODE_OCTAVES 1
 
+#define WT_MONO_BACKLIGHT
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index 88e9023539603f6959e72bc3c71bfceadd217576..88366edc049497df5c5ef499408f92f02e5c74b2 100644 (file)
 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
 //#define MIDI_TONE_KEYCODE_OCTAVES 1
 
+#define WT_MONO_BACKLIGHT
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index ca03c366e9dac178589e3f5eab2083d675e5d0f6..7c15e4a5b1379f7fff68aba790d5ea8bc7e356f2 100644 (file)
 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
 //#define MIDI_TONE_KEYCODE_OCTAVES 1
 
+#define WT_MONO_BACKLIGHT
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index de6d7b92c176e7fbf61da89145a0f5c3bf61d165..7a63ab5b74e628e762ecda01a4302b9ff3f11cc9 100644 (file)
@@ -15,7 +15,9 @@
  */
 
 #include "quantum.h"
+#ifdef WT_MONO_BACKLIGHT
 #include "keyboards/wilba_tech/wt_mono_backlight.h"
+#endif
 #include "keyboards/zeal60/zeal60_api.h" // Temporary hack
 #include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack
 
@@ -194,11 +196,13 @@ void main_init(void)
                eeprom_set_valid(true);
        }
 
+#ifdef WT_MONO_BACKLIGHT
        // Initialize LED drivers for backlight.
        backlight_init_drivers();
 
        backlight_timer_init();
        backlight_timer_enable();
+#endif
 }
 
 void bootmagic_lite(void)
@@ -230,8 +234,10 @@ void matrix_init_kb(void)
 
 void matrix_scan_kb(void)
 {
+#ifdef WT_MONO_BACKLIGHT
        // This only updates the LED driver buffers if something has changed.
        backlight_update_pwm_buffers();
+#endif
        matrix_scan_user();
 }