Fix a bug that led cannot light up when backlight is off
This commit is contained in:
parent
54360bf85b
commit
83ba4d37ad
@ -51,13 +51,6 @@ static const uint8_t backlight_table[] PROGMEM = {
|
||||
void backlight_enable(void)
|
||||
{
|
||||
#ifdef SOFTPWM_LED_ENABLE
|
||||
#if defined(GH60_REV_CHN)
|
||||
DDRB |= (1<<PB6);
|
||||
PORTB &= ~(1<<PB6);
|
||||
#else
|
||||
DDRF |= (1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
PORTF |= (1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
#endif
|
||||
softpwm_led_enable();
|
||||
#else
|
||||
#if defined(GH60_REV_CHN)
|
||||
@ -85,11 +78,6 @@ void backlight_disable(void)
|
||||
{
|
||||
#ifdef SOFTPWM_LED_ENABLE
|
||||
softpwm_led_disable();
|
||||
#if defined(GH60_REV_CHN)
|
||||
DDRB &= ~(1<<PB6);
|
||||
#else
|
||||
DDRF &= ~(1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
#endif
|
||||
#else
|
||||
#if defined(GH60_REV_CHN)
|
||||
// Turn off PWM
|
||||
|
@ -8,7 +8,7 @@
|
||||
static const uint8_t ledmaps[LED_COUNT] PROGMEM = {
|
||||
#if defined(GH60_REV_CHN)
|
||||
[0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2
|
||||
[1] = LEDMAP_BACKLIGHT, // PWM - PB6
|
||||
[1] = LEDMAP_LAYER(1) | LEDMAP_BACKLIGHT, // PWM - PB6
|
||||
#else
|
||||
[0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2
|
||||
[1] = LEDMAP_BACKLIGHT, // Esc - GPIO1 - PF6
|
||||
|
Reference in New Issue
Block a user