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 0x006B // 6-B
23 #define DEVICE_VER 0x0001
24 #define MANUFACTURER RAMA.WORKS
25 #define PRODUCT RAMA M6-B
26 #define DESCRIPTION RAMA M6-B 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 1
106 // This conditionally compiles the backlight code for M6-B specifics
107 #define RGB_BACKLIGHT_M6_B
109 // enable/disable LEDs based on layout
110 #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0
111 #define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
112 #define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0
113 #define RGB_BACKLIGHT_USE_7U_SPACEBAR 0
114 #define RGB_BACKLIGHT_USE_ISO_ENTER 0
115 #define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0
117 // disable backlight when USB suspended (PC sleep/hibernate/shutdown)
118 #define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
120 // disable backlight after timeout in minutes, 0 = no timeout
121 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
123 // the default effect (RGB test)
124 #define RGB_BACKLIGHT_EFFECT 255
126 // These define which keys in the matrix are alphas/mods
127 // Used for backlight effects so colors are different for
129 // Each value is for a row, bit 0 is column 0
131 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0
132 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0
133 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0
134 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0
135 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0
137 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
141 // TODO: refactor with new user EEPROM code (coming soon)
142 #define EEPROM_MAGIC 0x451F
143 #define EEPROM_MAGIC_ADDR 32
144 // Bump this every time we change what we store
145 // This will automatically reset the EEPROM with defaults
146 // and avoid loading invalid data from the EEPROM
147 #define EEPROM_VERSION 0x08
148 #define EEPROM_VERSION_ADDR 34
150 // Backlight config starts after EEPROM version
151 #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
152 // Dynamic keymap starts after backlight config (35+43)
153 #define DYNAMIC_KEYMAP_EEPROM_ADDR 78
154 // Dynamic macro starts after dynamic keymaps (78+(4*6*2)) = (78+48)
155 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 126
156 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 898
157 #define DYNAMIC_KEYMAP_MACRO_COUNT 16