]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/rama/m6_b/config.h
c2a225d53aaffd8e4919e56eccd93abc0c9aaee4
[qmk_firmware.git] / keyboards / rama / m6_b / config.h
1 /* Copyright 2018 Jason Williams (Wilba)
2  *
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.
7  *
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.
12  *
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/>.
15  */
16 #pragma once
17
18 #include "config_common.h"
19
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
27
28 /* key matrix size */
29 #define MATRIX_ROWS 1
30 #define MATRIX_COLS 6
31
32 /*
33  * Keyboard Matrix Assignments
34  *
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)
40  *
41 */
42 #define MATRIX_ROW_PINS { E6 }
43 #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 }
44 #define UNUSED_PINS
45
46 /* COL2ROW, ROW2COL*/
47 #define DIODE_DIRECTION COL2ROW
48
49 // #define BACKLIGHT_PIN B7
50 // #define BACKLIGHT_BREATHING
51 // #define BACKLIGHT_LEVELS 3
52
53 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
54 #define DEBOUNCING_DELAY 5
55
56 /* define if matrix has ghost (lacks anti-ghosting diodes) */
57 //#define MATRIX_HAS_GHOST
58
59 /* number of backlight levels */
60
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
65
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).
68  */
69 // #define GRAVE_ESC_CTRL_OVERRIDE
70
71 /*
72  * Force NKRO
73  *
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.)
77  *
78  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
79  * until the next keyboard reset.
80  *
81  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
82  * fully operational during normal computer usage.
83  *
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
87  * power-up.
88  *
89  */
90 //#define FORCE_NKRO
91
92 /*
93  * Magic Key Options
94  *
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
98  *
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.
101  *
102  */
103
104 #define RGB_BACKLIGHT_ENABLED 1
105
106 // This conditionally compiles the backlight code for M6-B specifics
107 #define RGB_BACKLIGHT_M6_B
108
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
116
117 // disable backlight when USB suspended (PC sleep/hibernate/shutdown)
118 #define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
119
120 // disable backlight after timeout in minutes, 0 = no timeout
121 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
122
123 // the default effect (RGB test)
124 #define RGB_BACKLIGHT_EFFECT 255
125
126 // These define which keys in the matrix are alphas/mods
127 // Used for backlight effects so colors are different for
128 // alphas vs. mods
129 // Each value is for a row, bit 0 is column 0
130 // Alpha=0 Mod=1
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
136
137 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
138
139 // EEPROM usage
140
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
149
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