diff options
author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2018-07-12 16:30:53 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-07-12 16:30:53 -0700 |
commit | f5ebfdabcdd72241103bf7c40b7668fbaca7281d (patch) | |
tree | 044da50d6fd56de4f57a7415a8a6b3162177a3a6 /keyboards/kmini/matrix.c | |
parent | ed98250e62d9e37218931d09a4216ffe09d3ce3a (diff) | |
download | qmk_firmware-f5ebfdabcdd72241103bf7c40b7668fbaca7281d.tar.gz qmk_firmware-f5ebfdabcdd72241103bf7c40b7668fbaca7281d.zip |
Kmini refactor and Configurator support (#3388)
* default keymap refactor: QMK_KEYBOARD_H include; readability
* Configurator support
* info.json was missing a comma
* Added matrix functions to matrix.c per @drashna
Diffstat (limited to 'keyboards/kmini/matrix.c')
-rwxr-xr-x | keyboards/kmini/matrix.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/keyboards/kmini/matrix.c b/keyboards/kmini/matrix.c index f0733340c..5f9bfe3d7 100755 --- a/keyboards/kmini/matrix.c +++ b/keyboards/kmini/matrix.c | |||
@@ -48,6 +48,22 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) | |||
48 | static void unselect_cols(void); | 48 | static void unselect_cols(void); |
49 | static void select_col(uint8_t col); | 49 | static void select_col(uint8_t col); |
50 | 50 | ||
51 | __attribute__ ((weak)) | ||
52 | void matrix_init_user(void) {} | ||
53 | |||
54 | __attribute__ ((weak)) | ||
55 | void matrix_scan_user(void) {} | ||
56 | |||
57 | __attribute__ ((weak)) | ||
58 | void matrix_init_kb(void) { | ||
59 | matrix_init_user(); | ||
60 | } | ||
61 | |||
62 | __attribute__ ((weak)) | ||
63 | void matrix_scan_kb(void) { | ||
64 | matrix_scan_user(); | ||
65 | } | ||
66 | |||
51 | inline | 67 | inline |
52 | uint8_t matrix_rows(void) { | 68 | uint8_t matrix_rows(void) { |
53 | return MATRIX_ROWS; | 69 | return MATRIX_ROWS; |
@@ -219,16 +235,16 @@ static void init_rows(void) { | |||
219 | static void unselect_cols(void) { | 235 | static void unselect_cols(void) { |
220 | DDRB |= (1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4); // OUT | 236 | DDRB |= (1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4); // OUT |
221 | PORTB &= ~((1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4)); // LO | 237 | PORTB &= ~((1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4)); // LO |
222 | 238 | ||
223 | DDRD |= (1<<4) | (1<<6) | (1<<7); // OUT | 239 | DDRD |= (1<<4) | (1<<6) | (1<<7); // OUT |
224 | PORTD &= ~((1<<4) | (1<<6) | (1<<7)); // LO | 240 | PORTD &= ~((1<<4) | (1<<6) | (1<<7)); // LO |
225 | 241 | ||
226 | DDRE |= (1<<6); // OUT | 242 | DDRE |= (1<<6); // OUT |
227 | PORTE &= ~((1<<6)); // LO | 243 | PORTE &= ~((1<<6)); // LO |
228 | 244 | ||
229 | DDRF |= (1<<0) | (1<<1); // OUT | 245 | DDRF |= (1<<0) | (1<<1); // OUT |
230 | PORTF &= ~((1<<0) | (1<<1)); // LO | 246 | PORTF &= ~((1<<0) | (1<<1)); // LO |
231 | 247 | ||
232 | DDRC |= (1<<7) | (1<<6); // OUT | 248 | DDRC |= (1<<7) | (1<<6); // OUT |
233 | PORTC &= ~((1<<7) | (1<<6)); // LO | 249 | PORTC &= ~((1<<7) | (1<<6)); // LO |
234 | } | 250 | } |