File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -237,3 +237,18 @@ static void select_row(uint8_t row) {
237
237
}
238
238
}
239
239
}
240
+
241
+ // DO NOT REMOVE
242
+ // Needed for proper wake/sleep
243
+ void matrix_power_up (void ) {
244
+ mcp23018_status = init_mcp23018 ();
245
+
246
+ unselect_rows ();
247
+ init_cols ();
248
+
249
+ // initialize matrix state: all keys off
250
+ for (uint8_t i = 0 ; i < MATRIX_ROWS ; i ++ ) {
251
+ matrix [i ] = 0 ;
252
+ }
253
+
254
+ }
Original file line number Diff line number Diff line change @@ -268,3 +268,32 @@ void matrix_print(void) {
268
268
printf ("\n" );
269
269
}
270
270
}
271
+
272
+ // DO NOT REMOVE
273
+ // Needed for proper wake/sleep
274
+ void matrix_power_up (void ) {
275
+ mcp23018_init ();
276
+
277
+ // outputs
278
+ setPinOutput (B10 );
279
+ setPinOutput (B11 );
280
+ setPinOutput (B12 );
281
+ setPinOutput (B13 );
282
+ setPinOutput (B14 );
283
+ setPinOutput (B15 );
284
+
285
+ // inputs
286
+ setPinInputLow (A0 );
287
+ setPinInputLow (A1 );
288
+ setPinInputLow (A2 );
289
+ setPinInputLow (A3 );
290
+ setPinInputLow (A6 );
291
+ setPinInputLow (A7 );
292
+ setPinInputLow (B0 );
293
+
294
+ // initialize matrix state: all keys off
295
+ for (uint8_t i = 0 ; i < MATRIX_ROWS ; i ++ ) {
296
+ matrix [i ] = 0 ;
297
+ }
298
+
299
+ }
You can’t perform that action at this time.
0 commit comments