aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xelus/valor/rev2/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/xelus/valor/rev2/config.h')
-rw-r--r--keyboards/xelus/valor/rev2/config.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h
new file mode 100644
index 000000000..66669fab4
--- /dev/null
+++ b/keyboards/xelus/valor/rev2/config.h
@@ -0,0 +1,88 @@
1/* Copyright 2021 Harrison Chan (Xelus)
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
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x5845 // "XE"
23#define PRODUCT_ID 0x5653 // Valor "VR" + 1
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Xelus
26#define PRODUCT Xelus Valor Rev2
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 15
31
32/* key matrix pins */
33#define MATRIX_ROW_PINS { B11, B10, A3, A1, A2 }
34#define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, A13, B7, B6, B5, B4, B3, A15, A14 }
35#define UNUSED_PINS
36
37/* COL2ROW or ROW2COL */
38#define DIODE_DIRECTION COL2ROW
39
40/* Set 0 if debouncing isn't needed */
41#define DEBOUNCE 5
42
43/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
44#define LOCKING_SUPPORT_ENABLE
45
46/* Locking resynchronize hack */
47#define LOCKING_RESYNC_ENABLE
48
49// I2C setup
50#define I2C1_SCL 8
51#define I2C1_SDA 9
52#define I2C1_SCL_PAL_MODE 4
53#define I2C1_SDA_PAL_MODE 4
54#define I2C1_TIMINGR_PRESC 0U
55#define I2C1_TIMINGR_SCLDEL 11U
56#define I2C1_TIMINGR_SDADEL 0U
57#define I2C1_TIMINGR_SCLH 14U
58#define I2C1_TIMINGR_SCLL 42U
59
60// I2C EEPROM
61#define EEPROM_I2C_24LC64
62
63// More EEPROM for layers
64#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
65
66/* RGB Matrix */
67#define RGB_DI_PIN A9
68#define RGBLED_NUM 28
69#define DRIVER_LED_TOTAL 28
70#define NOP_FUDGE 0.4
71
72// RGB PWM
73#define WS2812_PWM_DRIVER PWMD1
74#define WS2812_PWM_CHANNEL 2
75#define WS2812_PWM_PAL_MODE 1
76#define WS2812_DMA_STREAM STM32_DMA1_STREAM6
77#define WS2812_DMA_CHANNEL 7
78#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP
79
80// RGB Pullup
81#define WS2812_EXTERNAL_PULLUP
82
83// RGB Matrix settings
84#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
85#define RGB_MATRIX_KEYPRESSES
86#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
87#define RGB_DISABLE_WHEN_USB_SUSPENDED true
88#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_test_mode