1
0

Fix a bug that led cannot light up when backlight is off

This commit is contained in:
Kai Ryu 2014-07-31 13:49:40 +09:00
parent 54360bf85b
commit 83ba4d37ad
2 changed files with 1 additions and 13 deletions

View File

@ -51,13 +51,6 @@ static const uint8_t backlight_table[] PROGMEM = {
void backlight_enable(void) void backlight_enable(void)
{ {
#ifdef SOFTPWM_LED_ENABLE #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(); softpwm_led_enable();
#else #else
#if defined(GH60_REV_CHN) #if defined(GH60_REV_CHN)
@ -85,11 +78,6 @@ void backlight_disable(void)
{ {
#ifdef SOFTPWM_LED_ENABLE #ifdef SOFTPWM_LED_ENABLE
softpwm_led_disable(); softpwm_led_disable();
#if defined(GH60_REV_CHN)
DDRB &= ~(1<<PB6);
#else
DDRF &= ~(1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
#endif
#else #else
#if defined(GH60_REV_CHN) #if defined(GH60_REV_CHN)
// Turn off PWM // Turn off PWM

View File

@ -8,7 +8,7 @@
static const uint8_t ledmaps[LED_COUNT] PROGMEM = { static const uint8_t ledmaps[LED_COUNT] PROGMEM = {
#if defined(GH60_REV_CHN) #if defined(GH60_REV_CHN)
[0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2 [0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2
[1] = LEDMAP_BACKLIGHT, // PWM - PB6 [1] = LEDMAP_LAYER(1) | LEDMAP_BACKLIGHT, // PWM - PB6
#else #else
[0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2 [0] = LEDMAP_CAPS_LOCK | LEDMAP_BACKLIGHT, // CapsLock - PB2
[1] = LEDMAP_BACKLIGHT, // Esc - GPIO1 - PF6 [1] = LEDMAP_BACKLIGHT, // Esc - GPIO1 - PF6