1 /* Copyright 2018 Jason Williams (Wilba)
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
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
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/>.
18 #include "config_common.h"
20 /* USB Device descriptor parameter */
21 #define VENDOR_ID 0x5241 // "RW"
22 #define PRODUCT_ID 0x006A // 6-A
23 #define DEVICE_VER 0x0001
24 #define MANUFACTURER RAMA.WORKS
25 #define PRODUCT RAMA M6-A
26 #define DESCRIPTION RAMA M6-A Macropad
33 * Keyboard Matrix Assignments
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 #define MATRIX_ROW_PINS { E6 }
43 #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 }
47 #define DIODE_DIRECTION COL2ROW
49 // #define BACKLIGHT_PIN B7
50 // #define BACKLIGHT_BREATHING
51 // #define BACKLIGHT_LEVELS 3
53 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
54 #define DEBOUNCING_DELAY 5
56 /* define if matrix has ghost (lacks anti-ghosting diodes) */
57 //#define MATRIX_HAS_GHOST
59 /* number of backlight levels */
61 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
62 #define LOCKING_SUPPORT_ENABLE
63 /* Locking resynchronize hack */
64 #define LOCKING_RESYNC_ENABLE
66 /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
67 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
69 // #define GRAVE_ESC_CTRL_OVERRIDE
74 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
75 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
76 * makefile for this to work.)
78 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
79 * until the next keyboard reset.
81 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
82 * fully operational during normal computer usage.
84 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
85 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
86 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
95 * Magic keys are hotkey commands that allow control over firmware functions of
96 * the keyboard. They are best used in combination with the HID Listen program,
97 * found here: https://www.pjrc.com/teensy/hid_listen.html
99 * The options below allow the magic key functionality to be changed. This is
100 * useful if your keyboard/keypad is missing keys and you want magic key support.
104 #define RGB_BACKLIGHT_ENABLED 0
106 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
110 // TODO: refactor with new user EEPROM code (coming soon)
111 #define EEPROM_MAGIC 0x451F
112 #define EEPROM_MAGIC_ADDR 32
113 // Bump this every time we change what we store
114 // This will automatically reset the EEPROM with defaults
115 // and avoid loading invalid data from the EEPROM
116 #define EEPROM_VERSION 0x08
117 #define EEPROM_VERSION_ADDR 34
119 // NOTE: M6-A doesn't use RGB backlight, but we keep this
120 // consistent with M6-B which does.
122 // Backlight config starts after EEPROM version
123 #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
124 // Dynamic keymap starts after backlight config (35+43)
125 #define DYNAMIC_KEYMAP_EEPROM_ADDR 78
126 // Dynamic macro starts after dynamic keymaps (78+(4*6*2)) = (78+48)
127 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 126
128 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 898
129 #define DYNAMIC_KEYMAP_MACRO_COUNT 16