[Keymap] Drashna's OLED rewrite (#15981)
This commit is contained in:
@@ -43,12 +43,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
|
||||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
|
||||
#define WS2812_PWM_TARGET_PERIOD 800000
|
||||
|
||||
|
||||
#define RGBLED_NUM 52
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLED_SPLIT \
|
||||
{ 26, 26 }
|
||||
#define RGBLIGHT_LIMIT_VAL 150
|
||||
|
||||
#define DEBUG_LED_PIN C13
|
||||
|
||||
@@ -68,6 +69,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100
|
||||
|
||||
|
||||
#define CRC8_USE_TABLE
|
||||
#define CRC8_OPTIMIZE_SPEED
|
||||
|
||||
/* i2c config for oleds */
|
||||
#define I2C_DRIVER I2CD1
|
||||
#define I2C1_SCL_PIN B8
|
||||
@@ -75,9 +80,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define I2C1_SCL_PAL_MODE 4
|
||||
#define I2C1_SDA_PAL_MODE 4
|
||||
// #define I2C1_CLOCK_SPEED 400000
|
||||
/* For Legacy Compatibility: */
|
||||
#define I2C1_SCL 8
|
||||
#define I2C1_SDA 9
|
||||
|
||||
/* encoder config */
|
||||
#define ENCODERS_PAD_A \
|
||||
@@ -110,3 +112,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PMW3360_CS_PIN B0
|
||||
#define PMW3360_SPI_MODE 3
|
||||
#define PMW3360_SPI_DIVISOR 64
|
||||
#define PMW3360_FIRMWARE_UPLOAD_FAST
|
||||
|
@@ -0,0 +1,20 @@
|
||||
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef RGBLIGHT_LIMIT_VAL
|
||||
# if defined(OLED_ENABLE)
|
||||
# define RGBLIGHT_LIMIT_VAL 100
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 150
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef OLED_BRIGHTNESS
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# define OLED_BRIGHTNESS 80
|
||||
# else
|
||||
# define OLED_BRIGHTNESS 150
|
||||
# endif
|
||||
#endif
|
Reference in New Issue
Block a user