Commit | Line | Data |
---|---|---|
2dea540a W |
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 | */ | |
66ef1e3d | 16 | #pragma once |
59a78450 W |
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 | ||
fc069869 | 46 | /* COL2ROW, ROW2COL*/ |
59a78450 | 47 | #define DIODE_DIRECTION COL2ROW |
2dea540a | 48 | |
59a78450 W |
49 | // #define BACKLIGHT_PIN B7 |
50 | // #define BACKLIGHT_BREATHING | |
51 | // #define BACKLIGHT_LEVELS 3 | |
52 | ||
59a78450 W |
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 | ||
66ef1e3d W |
104 | #define RGB_BACKLIGHT_ENABLED 0 |
105 | ||
106 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | |
107 | ||
66ef1e3d W |
108 | // EEPROM usage |
109 | ||
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 | |
d7f1e072 | 116 | #define EEPROM_VERSION 0x08 |
66ef1e3d W |
117 | #define EEPROM_VERSION_ADDR 34 |
118 | ||
d7f1e072 W |
119 | // NOTE: M6-A doesn't use RGB backlight, but we keep this |
120 | // consistent with M6-B which does. | |
121 | ||
66ef1e3d W |
122 | // Backlight config starts after EEPROM version |
123 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 | |
d7f1e072 W |
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 |