|
@@ -42,22 +42,22 @@ static void select_col(uint8_t col);
|
|
reaches the value in the output compare register,
|
|
reaches the value in the output compare register,
|
|
and are turned on when it reaches TOP (=256). */
|
|
and are turned on when it reaches TOP (=256). */
|
|
static
|
|
static
|
|
-void setup_leds(void) {
|
|
+void setup_leds(void)
|
|
- TCCR1A |=
|
|
+{
|
|
- (1<<WGM10) |
|
|
+ TCCR1A |=
|
|
- (1<<COM1B1)|
|
|
+ (1<<WGM10) |
|
|
- (1<<COM1C1);
|
|
+ (1<<COM1B1)|
|
|
- TCCR1B |=
|
|
+ (1<<COM1C1);
|
|
- (1<<WGM12) |
|
|
+ TCCR1B |=
|
|
- (1<<CS12);
|
|
+ (1<<WGM12) |
|
|
- OCR1B = 250;
|
|
+ (1<<CS12);
|
|
- OCR1C = 250;
|
|
+ OCR1B = 250;
|
|
-
|
|
+ OCR1C = 250;
|
|
- DDRB &= 0x3F;
|
|
+
|
|
- PORTB &= 0x3F;
|
|
+ DDRB &= 0x3F;
|
|
|
|
+ PORTB &= 0x3F;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
inline
|
|
inline
|
|
uint8_t matrix_rows(void)
|
|
uint8_t matrix_rows(void)
|
|
{
|
|
{
|
|
@@ -82,7 +82,7 @@ void matrix_init(void)
|
|
setup_leds();
|
|
setup_leds();
|
|
|
|
|
|
|
|
|
|
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
|
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
matrix[i] = 0;
|
|
matrix[i] = 0;
|
|
matrix_debouncing[i] = 0;
|
|
matrix_debouncing[i] = 0;
|
|
}
|
|
}
|