|
@@ -32,6 +32,7 @@ static void init_rows(void);
|
|
static void unselect_cols(void);
|
|
static void unselect_cols(void);
|
|
static void select_col(uint8_t col);
|
|
static void select_col(uint8_t col);
|
|
|
|
|
|
|
|
+#ifndef SLEEP_LED_ENABLE
|
|
|
|
|
|
This activates fast PWM mode on them.
|
|
This activates fast PWM mode on them.
|
|
Prescaler 256 and 8-bit counter results in
|
|
Prescaler 256 and 8-bit counter results in
|
|
@@ -51,12 +52,13 @@ void setup_leds(void)
|
|
TCCR1B |=
|
|
TCCR1B |=
|
|
(1<<WGM12) |
|
|
(1<<WGM12) |
|
|
(1<<CS12);
|
|
(1<<CS12);
|
|
- OCR1B = 250;
|
|
+ OCR1B = LED_BRIGHTNESS;
|
|
- OCR1C = 250;
|
|
+ OCR1C = LED_BRIGHTNESS;
|
|
|
|
|
|
- DDRB &= 0x3F;
|
|
+ DDRB |= (1<<6) | (1<<7);
|
|
- PORTB &= 0x3F;
|
|
+ PORTB &= ~((1<<6) | (1<<7));
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
inline
|
|
inline
|
|
uint8_t matrix_rows(void)
|
|
uint8_t matrix_rows(void)
|
|
@@ -79,7 +81,9 @@ void matrix_init(void)
|
|
|
|
|
|
unselect_cols();
|
|
unselect_cols();
|
|
init_rows();
|
|
init_rows();
|
|
|
|
+#ifndef SLEEP_LED_ENABLE
|
|
setup_leds();
|
|
setup_leds();
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|