lotus: Implement single-zone backlight
Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
parent
a937aba31e
commit
de751501b6
@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <config_common.h>
|
||||
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||
@ -22,6 +24,11 @@
|
||||
#define DRIVER_COUNT 1
|
||||
#define RGB_MATRIX_LED_COUNT 78
|
||||
|
||||
// PWM single one backlight configuration
|
||||
// The RP2040 datasheet says GPIO25 maps to PWM channel 4B
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD4
|
||||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
|
||||
@ -5,4 +5,7 @@
|
||||
|
||||
#define HAL_USE_SIO TRUE
|
||||
|
||||
// For single-zone backlight
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
||||
@ -26,6 +26,9 @@
|
||||
"pid": "0x0013",
|
||||
"vid": "0x32AC"
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "GP25"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 12,
|
||||
"pin": "GP6",
|
||||
|
||||
@ -9,3 +9,7 @@
|
||||
#define RP_SIO_USE_UART0 TRUE
|
||||
#undef RP_SIO_USE_UART1
|
||||
#define RP_SIO_USE_UART1 FALSE
|
||||
|
||||
// For single-zone backlight
|
||||
#undef RP_PWM_USE_PWM4
|
||||
#define RP_PWM_USE_PWM4 TRUE
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
WS2812_DRIVER = vendor
|
||||
SERIAL_DRIVER = vendor
|
||||
#RGB_MATRIX_ENABLE = false
|
||||
|
||||
# Backlight for one variant
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = pwm
|
||||
|
||||
# TODO: Enable RGB matrix for one variant
|
||||
RGB_MATRIX_ENABLE = no
|
||||
RGB_MATRIX_DRIVER = IS31FL3745
|
||||
|
||||
# Custom matrix scanning code via ADC
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user