2022-12-15 19:14:50 -08:00
|
|
|
// Copyright 2022 Framework Computer
|
2022-12-15 19:10:32 -08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-01-31 18:00:15 -08:00
|
|
|
// Allow (emulated) EEPROM reset using VIA
|
|
|
|
#define VIA_EEPROM_ALLOW_RESET
|
|
|
|
|
2023-10-25 22:57:06 -07:00
|
|
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 10
|
|
|
|
|
2023-08-06 23:21:13 -07:00
|
|
|
// Increase to 16K for more storage space
|
|
|
|
// With 64K backing size, this spread the wear level over 4 blocks
|
|
|
|
#define WEAR_LEVELING_LOGICAL_SIZE (4*4096)
|
|
|
|
// Increase to 64K backing size to allow more wear leveling
|
|
|
|
#define WEAR_LEVELING_BACKING_SIZE (16 * 4096)
|
|
|
|
// We use 1MB flash
|
|
|
|
#define PICO_FLASH_SIZE_BYTES (1 * 1024 * 1024)
|
|
|
|
#define WEAR_LEVELING_RP2040_FLASH_SIZE PICO_FLASH_SIZE_BYTES
|
|
|
|
// Keep the last 4K sector free for the serial number
|
|
|
|
#define WEAR_LEVELING_RP2040_FLASH_BASE ((PICO_FLASH_SIZE_BYTES) - (WEAR_LEVELING_BACKING_SIZE + 4096))
|
|
|
|
|
|
|
|
|
2023-01-13 01:10:15 -08:00
|
|
|
// Prints every second how many matrix scans were done (Frequency in Hz)
|
2023-06-12 00:01:12 -07:00
|
|
|
// Only during debugging, since it prevents the host from going to sleep
|
|
|
|
//#define DEBUG_MATRIX_SCAN_RATE
|
2023-01-13 01:10:15 -08:00
|
|
|
|
2023-03-22 20:51:08 -07:00
|
|
|
// Prototype for Framework Laptop 16 with Raspberry Pi Pico
|
2023-01-07 04:54:30 -08:00
|
|
|
// It'll disable column drive because we need to remap some pins to there
|
2023-01-06 21:34:25 -08:00
|
|
|
// SDB is mapped to GP22
|
2023-03-22 20:51:08 -07:00
|
|
|
//#define PICO_FL16
|
2023-01-06 21:34:25 -08:00
|
|
|
|
2023-03-22 22:25:02 -07:00
|
|
|
// Enable serial number. Calls into dyn_serial_number_string* functions
|
2023-01-16 19:29:52 -08:00
|
|
|
#define SERIAL_NUMBER
|
2023-01-05 00:08:12 -08:00
|
|
|
|
2023-03-22 22:25:02 -07:00
|
|
|
#ifdef KEYBOARD_framework_ansi
|
2022-12-29 20:24:46 -08:00
|
|
|
#define LED_CAPS_LOCK_PIN GP24
|
2023-03-22 22:25:02 -07:00
|
|
|
#elif KEYBOARD_framework_iso
|
2022-12-29 20:24:46 -08:00
|
|
|
#define LED_CAPS_LOCK_PIN GP24
|
2023-03-22 22:25:02 -07:00
|
|
|
#elif KEYBOARD_framework_jis
|
2022-12-29 20:24:46 -08:00
|
|
|
#define LED_CAPS_LOCK_PIN GP24
|
2023-03-22 22:25:02 -07:00
|
|
|
#elif KEYBOARD_framework_numpad
|
2022-12-29 20:24:46 -08:00
|
|
|
#define LED_NUM_LOCK_PIN GP24
|
2023-07-10 13:35:45 -07:00
|
|
|
#elif KEYBOARD_framework_macropad
|
2022-12-29 20:24:46 -08:00
|
|
|
#endif
|
2022-12-20 03:27:10 -08:00
|
|
|
|
2022-12-20 02:46:45 -08:00
|
|
|
// PWM single one backlight configuration
|
2023-03-01 00:12:16 -08:00
|
|
|
// GPIO25 maps to PWM channel 4B of the RP2040
|
2022-12-27 01:19:51 -08:00
|
|
|
// On the Raspberry Pi Pico this is the green LED on the board, good for prototyping
|
2022-12-20 02:46:45 -08:00
|
|
|
#define BACKLIGHT_PWM_DRIVER PWMD4
|
|
|
|
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
2023-02-06 02:00:34 -08:00
|
|
|
#define BACKLIGHT_BREATHING
|
2023-07-13 05:23:38 -07:00
|
|
|
// Change PWM frequency to 24kHz, the default of 2048Hz causes loud noise
|
|
|
|
#define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 24000
|
2022-12-20 02:46:45 -08:00
|
|
|
|
2023-01-05 17:43:48 -08:00
|
|
|
// I2C for the RBG controller
|
2023-01-05 23:41:11 -08:00
|
|
|
#define I2C_DRIVER I2CD1
|
2023-01-05 05:02:13 -08:00
|
|
|
#define I2C1_SDA_PIN GP26
|
|
|
|
#define I2C1_SCL_PIN GP27
|
|
|
|
|
2023-01-09 18:18:35 -08:00
|
|
|
// RGB config
|
|
|
|
|
2023-11-17 01:14:41 -08:00
|
|
|
// Don't turn off backlight and caps LED when in USB suspend
|
|
|
|
// Because with selective suspend, the driver will eagerly suspend the keyboard after only a short while of inactivity
|
|
|
|
#define NO_SUSPEND_POWER_DOWN
|
|
|
|
// Must keep this, so we can suspend RGB backlight with SLEEP# pin
|
2023-01-05 16:30:37 -08:00
|
|
|
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
2023-01-09 18:18:35 -08:00
|
|
|
|
2023-01-05 16:30:37 -08:00
|
|
|
// RGB Matrix Animation modes. Explicitly enabled
|
|
|
|
// For full list of effects, see:
|
|
|
|
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
2023-01-31 01:02:46 -08:00
|
|
|
// 0 = Off
|
|
|
|
// 1 = Solid Color
|
|
|
|
// 2
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
|
|
|
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
|
|
|
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
|
|
|
// #define ENABLE_RGB_MATRIX_BREATHING
|
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_SAT
|
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_VAL
|
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
2023-01-31 01:02:46 -08:00
|
|
|
// 10
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
|
|
|
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_ALL
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
|
|
|
// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
|
|
|
// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
2023-01-31 01:02:46 -08:00
|
|
|
// 20
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_DUAL_BEACON
|
|
|
|
// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
|
|
|
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
|
|
|
// #define ENABLE_RGB_MATRIX_RAINDROPS
|
|
|
|
// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
|
|
|
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
|
|
|
|
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
|
|
|
// #define ENABLE_RGB_MATRIX_HUE_WAVE
|
|
|
|
// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
|
|
|
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
2023-01-31 01:02:46 -08:00
|
|
|
// 30
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
2023-01-31 01:02:46 -08:00
|
|
|
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
|
|
|
// // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
|
|
|
// #define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
|
|
|
// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
2023-01-09 18:18:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
#define RGB_MATRIX_KEYPRESSES
|
2023-01-05 16:30:37 -08:00
|
|
|
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
2023-01-31 01:02:46 -08:00
|
|
|
// 33
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
2023-01-05 16:30:37 -08:00
|
|
|
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
2023-01-31 01:02:46 -08:00
|
|
|
// 40
|
2024-05-05 11:26:23 -07:00
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
|
|
|
// #define ENABLE_RGB_MATRIX_SPLASH
|
|
|
|
// #define ENABLE_RGB_MATRIX_MULTISPLASH
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
|
|
|
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
2023-01-05 16:30:37 -08:00
|
|
|
|
2023-10-29 18:26:33 -07:00
|
|
|
#define ISSI_CUSTOM_PWM_FREQ
|
|
|
|
|
2022-12-15 19:10:32 -08:00
|
|
|
/*
|
|
|
|
* Feature disable options
|
|
|
|
* These options are also useful to firmware size reduction.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* disable debug print */
|
|
|
|
//#define NO_DEBUG
|
|
|
|
|
|
|
|
/* disable print */
|
|
|
|
//#define NO_PRINT
|
|
|
|
|
|
|
|
/* disable action features */
|
|
|
|
//#define NO_ACTION_LAYER
|
|
|
|
//#define NO_ACTION_TAPPING
|
|
|
|
//#define NO_ACTION_ONESHOT
|
2024-05-05 11:26:23 -07:00
|
|
|
|
|
|
|
/* tgrosinger config */
|
|
|
|
#define RGB_MATRIX_DEFAULT_ON true
|
|
|
|
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
|
|
|
#define RGB_MATRIX_DEFAULT_HUE 128 // Sets the default hue value, if none has been set
|
|
|
|
#define RGB_MATRIX_DEFAULT_SAT 255
|