X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=keyboard%2Fphantom%2Fmatrix.c;h=6c3ae49c3a198eeabdb2ffa41d17b9c67aea9497;hb=79cfa894afbc0a94ac642f57de905d9afc068ce7;hp=c91c0d99ab708e6368fce5036bd58b30a9f9170c;hpb=9e84c89535c4091522f8053a0d96b6c2ab7cc51c;p=max%2Ftmk_keyboard.git diff --git a/keyboard/phantom/matrix.c b/keyboard/phantom/matrix.c index c91c0d99..6c3ae49c 100644 --- a/keyboard/phantom/matrix.c +++ b/keyboard/phantom/matrix.c @@ -32,6 +32,7 @@ static void init_rows(void); static void unselect_cols(void); static void select_col(uint8_t col); +#ifndef SLEEP_LED_ENABLE /* LEDs are on output compare pins OC1B OC1C This activates fast PWM mode on them. Prescaler 256 and 8-bit counter results in @@ -51,12 +52,13 @@ void setup_leds(void) TCCR1B |= // Timer control register 1B (1< PORTB6, LED_B -> PORTB7 - DDRB &= 0x3F; - PORTB &= 0x3F; + DDRB |= (1<<6) | (1<<7); + PORTB &= ~((1<<6) | (1<<7)); } +#endif inline uint8_t matrix_rows(void) @@ -79,7 +81,9 @@ void matrix_init(void) // initialize row and col unselect_cols(); init_rows(); +#ifndef SLEEP_LED_ENABLE setup_leds(); +#endif // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) {