diff options
Diffstat (limited to 'keyboard/hhkb_rn42/hhkb_avr.h')
-rw-r--r-- | keyboard/hhkb_rn42/hhkb_avr.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/keyboard/hhkb_rn42/hhkb_avr.h b/keyboard/hhkb_rn42/hhkb_avr.h index 313effedfe..f007d7667a 100644 --- a/keyboard/hhkb_rn42/hhkb_avr.h +++ b/keyboard/hhkb_rn42/hhkb_avr.h @@ -43,11 +43,10 @@ static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } #ifdef HHKB_POWER_SAVING static inline void KEY_POWER_ON(void) { - _delay_ms(10); // TODO: sleep to save power DDRB = 0xFF; PORTB = 0x40; // change pins output DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on /* Without this wait you will miss or get false key events. */ - _delay_ms(1); // wait for powering up + _delay_ms(5); // wait for powering up } static inline void KEY_POWER_OFF(void) { /* input with pull-up consumes less than without it when pin is open. */ @@ -74,7 +73,7 @@ static inline void KEY_INIT(void) KEY_UNABLE(); KEY_PREV_OFF(); - KEY_POWER_OFF(); + KEY_POWER_ON(); } static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) { |