aboutsummaryrefslogtreecommitdiff
path: root/keyboards/clueboard/66_hotswap/gen1/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/clueboard/66_hotswap/gen1/config.h')
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/config.h158
1 files changed, 130 insertions, 28 deletions
diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h
index d5d36d4a1..6b0cfb60b 100644
--- a/keyboards/clueboard/66_hotswap/gen1/config.h
+++ b/keyboards/clueboard/66_hotswap/gen1/config.h
@@ -1,44 +1,146 @@
1#pragma once 1/*
2 * Copyright 2017 skully <skullydazed@gmail.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
2 17
18#pragma once
3#include "config_common.h" 19#include "config_common.h"
4 20
5#define PRODUCT_ID 0x2390 21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xC1ED
23#define PRODUCT_ID 0x2391
6#define DEVICE_VER 0x0001 24#define DEVICE_VER 0x0001
25#define MANUFACTURER Clueboard
26
27/* Address for jumping to bootloader on STM32 chips. */
28/* It is chip dependent, the correct number can be looked up here:
29 * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
30 * This also requires a patch to chibios:
31 * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
32 */
33#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
7 34
8/* key matrix size */ 35/* key matrix size */
9#define MATRIX_ROWS 10 36#define MATRIX_ROWS 10
10#define MATRIX_COLS 8 37#define MATRIX_COLS 8
11 38
12/* ROWS: Top to bottom, COLS: Left to right 39/*
40 * Keyboard Matrix Assignments
41 *
42 * Change this to how you wired your keyboard
43 * COLS: AVR pins used for columns, left to right
44 * ROWS: AVR pins used for rows, top to bottom
45 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
46 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
47 *
13*/ 48*/
14#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } 49#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 }
15#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } 50#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 }
16#define UNUSED_PINS 51#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 }
52#define DIODE_DIRECTION COL2ROW
53
54/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55#define DEBOUNCE 6
17 56
18/* Speaker configuration 57/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
58//#define LOCKING_SUPPORT_ENABLE
59/* Locking resynchronize hack */
60//#define LOCKING_RESYNC_ENABLE
61
62/*
63 * Force NKRO
64 *
65 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
66 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
67 * makefile for this to work.)
68 *
69 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
70 * until the next keyboard reset.
71 *
72 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
73 * fully operational during normal computer usage.
74 *
75 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
76 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
77 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
78 * power-up.
79 *
19 */ 80 */
20#define B7_AUDIO 81//#define FORCE_NKRO
21#define NO_MUSIC_MODE 82
22#define AUDIO_CLICKY 83/* key combination for magic key command */
84#define IS_COMMAND() ( \
85 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
86)
23 87
24/* Backlight configuration 88/*
89 * Feature disable options
90 * These options are also useful to firmware size reduction.
25 */ 91 */
26#define BACKLIGHT_LEVELS 1
27 92
28/* Underlight configuration 93/* disable debug print */
94//#define NO_DEBUG
95
96/* disable print */
97//#define NO_PRINT
98
99/* disable action features */
100//#define NO_ACTION_LAYER
101//#define NO_ACTION_TAPPING
102//#define NO_ACTION_ONESHOT
103//#define NO_ACTION_MACRO
104//#define NO_ACTION_FUNCTION
105
106/*
107 * MIDI options
29 */ 108 */
30#define RGB_DI_PIN D7 109
31#define RGBLED_NUM 26 // Number of LEDs 110/* Prevent use of disabled MIDI features in the keymap */
32#define RGBLIGHT_HUE_STEP 32 111//#define MIDI_ENABLE_STRICT 1
33#define RGBLIGHT_SAT_STEP 17 112
34#define RGBLIGHT_VAL_STEP 17 113/* enable basic MIDI features:
35 114 - MIDI notes can be sent when in Music mode is on
36#define RGBLIGHT_ANIMATIONS 115*/
37#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 116//#define MIDI_BASIC
38#define RGBLIGHT_EFFECT_BREATHE_MAX 200 117
39#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 118/* enable advanced MIDI features:
40#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 119 - MIDI notes can be added to the keymap
41#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up 120 - Octave shift and transpose
42#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at 121 - Virtual sustain, portamento, and modulation wheel
43#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel 122 - etc.
44#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up 123*/
124//#define MIDI_ADVANCED
125
126/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
127//#define MIDI_TONE_KEYCODE_OCTAVES 1
128
129 /* Backlight configuration
130 */
131#define BACKLIGHT_LEVELS 10
132
133// This is a 7-bit address, that gets left-shifted and bit 0
134// set to 0 for write, 1 for read (as per I2C protocol)
135// The address will vary depending on your wiring:
136// 0b1110100 AD <-> GND
137// 0b1110111 AD <-> VCC
138// 0b1110101 AD <-> SCL
139// 0b1110110 AD <-> SDA
140#define LED_DRIVER_ADDR_1 0b1110100
141#define I2C1_BANK GPIOB
142#define I2C1_SCL 8
143#define I2C1_SDA 9
144
145#define LED_DRIVER_COUNT 1
146#define LED_DRIVER_LED_COUNT 71