aboutsummaryrefslogtreecommitdiff
path: root/keyboards/system76/launch_1/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/system76/launch_1/config.h')
-rw-r--r--keyboards/system76/launch_1/config.h121
1 files changed, 121 insertions, 0 deletions
diff --git a/keyboards/system76/launch_1/config.h b/keyboards/system76/launch_1/config.h
new file mode 100644
index 000000000..19752d58d
--- /dev/null
+++ b/keyboards/system76/launch_1/config.h
@@ -0,0 +1,121 @@
1/*
2 * Copyright (C) 2021 System76
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 3 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 <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "config_common.h"
21
22// USB device descriptor parameter
23#define VENDOR_ID 0x3384
24#define PRODUCT_ID 0x0001
25#define DEVICE_VER 0x0001
26#define MANUFACTURER System76
27#define PRODUCT Launch Configurable Keyboard (launch_1)
28
29// Key matrix size
30#define MATRIX_ROWS 6
31#define MATRIX_COLS 14
32
33/*
34 * Key matrix pins
35 * ROWS: AVR pins used for rows, top to bottom
36 * COLS: AVR pins used for columns, left to right
37 */
38#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 }
39#define MATRIX_COL_PINS { D7, C7, C6, B6, B5, B4, D6, D4, E6, D5, D3, D2, B7, B0 }
40#define UNUSED_PINS
41
42/*
43 * Diode Direction
44 * COL2ROW = COL => Anode (+), ROW => Cathode (-)
45 * ROW2COL = ROW => Anode (+), COL => Cathode (-)
46 */
47#define DIODE_DIRECTION COL2ROW
48
49// Set 0 if debouncing isn't needed
50#define DEBOUNCE 5
51
52#ifdef RGB_MATRIX_ENABLE
53# define RGB_DI_PIN E2
54# define DRIVER_LED_TOTAL 84
55# define RGB_MATRIX_KEYPRESSES // Reacts to keypresses
56// # define RGB_MATRIX_KEYRELEASES // Reacts to keyreleases (instead of keypresses)
57// # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Enables framebuffer effects
58# define RGB_DISABLE_TIMEOUT 0 // Number of milliseconds to wait until RGB automatically turns off
59# define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: Number of ticks to wait until disabling effects
60# define RGB_DISABLE_WHEN_USB_SUSPENDED // Turns off effects when suspended
61// Limit brightness to support USB-A at 0.5 A
62// TODO: Do this dynamically based on power source
63# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 176 // Limits maximum brightness of LEDs to 176 out of 255. If not defined, maximum brightness is set to 255
64# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Sets the default mode, if none has been set
65# define RGB_MATRIX_STARTUP_HUE 142 // Sets the default hue value, if none has been set
66# define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
67# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
68# define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
69# define RGB_MATRIX_DISABLE_KEYCODES // Disables control of rgb matrix by keycodes (must use code functions to control the feature)
70
71# define ENABLE_RGB_MATRIX_CYCLE_ALL
72# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
73# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
74# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
75# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
76# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
77# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
78# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
79# define ENABLE_RGB_MATRIX_RAINDROPS
80# define ENABLE_RGB_MATRIX_SPLASH
81# define ENABLE_RGB_MATRIX_MULTISPLASH
82#endif // RGB_MATRIX_ENABLE
83
84// Mechanical locking support; use KC_LCAP, KC_LNUM, or KC_LSCR instead in keymap
85#define LOCKING_SUPPORT_ENABLE
86
87// Locking resynchronize hack
88#define LOCKING_RESYNC_ENABLE
89
90// I2C {
91#define F_SCL 100000UL // Run I2C bus at 100 kHz
92#define I2C_START_RETRY_COUNT 20
93#define I2C_TIMEOUT 100 // milliseconds
94// } I2C
95
96// EEPROM {
97#define EEPROM_SIZE 1024
98// TODO: Refactor with new user EEPROM code (coming soon)
99#define EEPROM_MAGIC 0x76EC
100#define EEPROM_MAGIC_ADDR 64
101// Bump this every time we change what we store
102// This will automatically reset the EEPROM with defaults
103// and avoid loading invalid data from the EEPROM
104#define EEPROM_VERSION 0x02
105#define EEPROM_VERSION_ADDR (EEPROM_MAGIC_ADDR + 2)
106// } EEPROM
107
108// Dynamic keymap {
109#define DYNAMIC_KEYMAP_LAYER_COUNT 4
110#define DYNAMIC_KEYMAP_MACRO_COUNT 0
111// Dynamic keymap starts after EEPROM version
112#define DYNAMIC_KEYMAP_EEPROM_ADDR (EEPROM_VERSION_ADDR + 1)
113// Dynamic macro starts after dynamic keymaps, it is disabled
114#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2))
115#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 0
116// } Dynamic keymap
117
118// System76 EC {
119#define SYSTEM76_EC_EEPROM_ADDR (DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE)
120#define SYSTEM76_EC_EEPROM_SIZE (EEPROM_SIZE - SYSTEM76_EC_EEPROM_ADDR)
121// } System76 EC