]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/rama/m6_a/config.h
Refactoring M6-A, M6-B, Zeal60, Zeal65, WT60-A, WT65-A, WT80-A (#4417)
[qmk_firmware.git] / keyboards / rama / m6_a / 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      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
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, or CUSTOM_MATRIX */
47 #define DIODE_DIRECTION COL2ROW
48
49 // #define BACKLIGHT_PIN B7
50 // #define BACKLIGHT_BREATHING
51 // #define BACKLIGHT_LEVELS 3
52
53
54 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55 #define DEBOUNCING_DELAY 5
56
57 /* define if matrix has ghost (lacks anti-ghosting diodes) */
58 //#define MATRIX_HAS_GHOST
59
60 /* number of backlight levels */
61
62 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
63 #define LOCKING_SUPPORT_ENABLE
64 /* Locking resynchronize hack */
65 #define LOCKING_RESYNC_ENABLE
66
67 /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
68  * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
69  */
70 // #define GRAVE_ESC_CTRL_OVERRIDE
71
72 /*
73  * Force NKRO
74  *
75  * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
76  * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
77  * makefile for this to work.)
78  *
79  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
80  * until the next keyboard reset.
81  *
82  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
83  * fully operational during normal computer usage.
84  *
85  * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
86  * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
87  * bootmagic, NKRO mode will always be enabled until it is toggled again during a
88  * power-up.
89  *
90  */
91 //#define FORCE_NKRO
92
93 /*
94  * Magic Key Options
95  *
96  * Magic keys are hotkey commands that allow control over firmware functions of
97  * the keyboard. They are best used in combination with the HID Listen program,
98  * found here: https://www.pjrc.com/teensy/hid_listen.html
99  *
100  * The options below allow the magic key functionality to be changed. This is
101  * useful if your keyboard/keypad is missing keys and you want magic key support.
102  *
103  */
104
105 /* key combination for magic key command */
106 #define IS_COMMAND() ( \
107     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
108 )
109
110 #define RGB_BACKLIGHT_ENABLED 0
111
112 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
113
114 // EEPROM usage
115
116 // TODO: refactor with new user EEPROM code (coming soon)
117 #define EEPROM_MAGIC 0x451F
118 #define EEPROM_MAGIC_ADDR 32
119 // Bump this every time we change what we store
120 // This will automatically reset the EEPROM with defaults
121 // and avoid loading invalid data from the EEPROM
122 #define EEPROM_VERSION 0x07
123 #define EEPROM_VERSION_ADDR 34
124
125 // Backlight config starts after EEPROM version
126 #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
127 // Dynamic keymap starts after backlight config (35+37)
128 #define DYNAMIC_KEYMAP_EEPROM_ADDR 72
129