diff options
| author | Mathias Andersson <wraul@dbox.se> | 2013-05-01 11:30:01 +0200 |
|---|---|---|
| committer | Mathias Andersson <wraul@dbox.se> | 2013-05-02 20:37:41 +0200 |
| commit | 3f48b13f81f276dc8d0bd96607b70d13f9b5e883 (patch) | |
| tree | 52483d6343a36b50491a6689b23a2c33daef278b /keyboard/phantom | |
| parent | 1e07b60d3ac6f9ad150bd9dab564af2583b97774 (diff) | |
| download | qmk_firmware-3f48b13f81f276dc8d0bd96607b70d13f9b5e883.tar.gz qmk_firmware-3f48b13f81f276dc8d0bd96607b70d13f9b5e883.zip | |
Code style fixes for Phantom matrix.
Diffstat (limited to 'keyboard/phantom')
| -rw-r--r-- | keyboard/phantom/matrix.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/keyboard/phantom/matrix.c b/keyboard/phantom/matrix.c index e9606ef5d..386feea41 100644 --- a/keyboard/phantom/matrix.c +++ b/keyboard/phantom/matrix.c | |||
| @@ -42,22 +42,22 @@ static void select_col(uint8_t col); | |||
| 42 | reaches the value in the output compare register, | 42 | reaches the value in the output compare register, |
| 43 | and are turned on when it reaches TOP (=256). */ | 43 | and are turned on when it reaches TOP (=256). */ |
| 44 | static | 44 | static |
| 45 | void setup_leds(void) { | 45 | void setup_leds(void) |
| 46 | TCCR1A |= // Timer control register 1A | 46 | { |
| 47 | (1<<WGM10) | // Fast PWM 8-bit | 47 | TCCR1A |= // Timer control register 1A |
| 48 | (1<<COM1B1)| // Clear OC1B on match, set at TOP | 48 | (1<<WGM10) | // Fast PWM 8-bit |
| 49 | (1<<COM1C1); // Clear OC1C on match, set at TOP | 49 | (1<<COM1B1)| // Clear OC1B on match, set at TOP |
| 50 | TCCR1B |= // Timer control register 1B | 50 | (1<<COM1C1); // Clear OC1C on match, set at TOP |
| 51 | (1<<WGM12) | // Fast PWM 8-bit | 51 | TCCR1B |= // Timer control register 1B |
| 52 | (1<<CS12); // Prescaler 256 | 52 | (1<<WGM12) | // Fast PWM 8-bit |
| 53 | OCR1B = 250; // Output compare register 1B | 53 | (1<<CS12); // Prescaler 256 |
| 54 | OCR1C = 250; // Output compare register 1C | 54 | OCR1B = 250; // Output compare register 1B |
| 55 | // LEDs: LED_A -> PORTB6, LED_B -> PORTB7 | 55 | OCR1C = 250; // Output compare register 1C |
| 56 | DDRB &= 0x3F; | 56 | // LEDs: LED_A -> PORTB6, LED_B -> PORTB7 |
| 57 | PORTB &= 0x3F; | 57 | DDRB &= 0x3F; |
| 58 | PORTB &= 0x3F; | ||
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | |||
| 61 | inline | 61 | inline |
| 62 | uint8_t matrix_rows(void) | 62 | uint8_t matrix_rows(void) |
| 63 | { | 63 | { |
| @@ -82,7 +82,7 @@ void matrix_init(void) | |||
| 82 | setup_leds(); | 82 | setup_leds(); |
| 83 | 83 | ||
| 84 | // initialize matrix state: all keys off | 84 | // initialize matrix state: all keys off |
| 85 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | 85 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { |
| 86 | matrix[i] = 0; | 86 | matrix[i] = 0; |
| 87 | matrix_debouncing[i] = 0; | 87 | matrix_debouncing[i] = 0; |
| 88 | } | 88 | } |
