forked from mirrors/qmk_userspace
[Core] PWM Backlight for RP2040 (#17706)
This commit is contained in:
parent
b6ea8837e4
commit
996a9006d3
14 changed files with 107 additions and 22 deletions
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
#define BACKLIGHT_PAL_MODE 2
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
#define BACKLIGHT_PAL_MODE 2
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
#define BACKLIGHT_PAL_MODE 2
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
|
|
|
|||
|
|
@ -13,3 +13,6 @@
|
|||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD4
|
||||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
|
||||
|
|
|
|||
9
keyboards/handwired/onekey/rp2040/halconf.h
Normal file
9
keyboards/handwired/onekey/rp2040/halconf.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
|
@ -6,7 +6,10 @@
|
|||
"cols": ["GP4"],
|
||||
"rows": ["GP5"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "GP25"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
"pin": "GP25"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
keyboards/handwired/onekey/rp2040/mcuconf.h
Normal file
9
keyboards/handwired/onekey/rp2040/mcuconf.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Copyright 2022 Stefan Kerkmann
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
|
||||
#undef RP_PWM_USE_PWM4
|
||||
#define RP_PWM_USE_PWM4 TRUE
|
||||
Loading…
Add table
Add a link
Reference in a new issue