From cc45f62d757f56c2fa9be92685f83f127b63b509 Mon Sep 17 00:00:00 2001 From: Wilba6582 Date: Thu, 13 Dec 2018 19:33:04 +1100 Subject: Added Dynamic Keymaps to M10-B --- keyboards/rama/m10_b/config.h | 24 ++++++++++++++- keyboards/rama/m10_b/keymaps/default/keymap.c | 18 ------------ keyboards/rama/m10_b/keymaps/knops/config.h | 3 +- keyboards/rama/m10_b/m10_b.c | 31 ++------------------ keyboards/rama/m10_b/rules.mk | 42 +++++++++++++-------------- keyboards/rama/u80_a/config.h | 2 ++ keyboards/rama/u80_a/rules.mk | 1 - 7 files changed, 50 insertions(+), 71 deletions(-) (limited to 'keyboards/rama') 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 . #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 . /* 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 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] = { 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; -} 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 @@ #include "../../config.h" -// place overrides here +#undef RAW_ENABLE +#undef DYNAMIC_KEYMAP_ENABLE #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 @@ -/* 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 @@ -13,32 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#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... ;-) 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 @@ +# 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 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 @@ /* 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 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 RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = yes \ No newline at end of file -- cgit v1.2.3-24-g4f1b