Commit a4b6fe0 1 parent edd5825 commit a4b6fe0 Copy full SHA for a4b6fe0
File tree 2 files changed +50
-0
lines changed
2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -321,3 +321,18 @@ static void select_row(uint8_t row) {
321
321
}
322
322
}
323
323
}
324
+
325
+ // DO NOT REMOVE
326
+ // Needed for proper wake/sleep
327
+ void matrix_power_up (void ) {
328
+ mcp23018_status = init_mcp23018 ();
329
+
330
+ unselect_rows ();
331
+ init_cols ();
332
+
333
+ // initialize matrix state: all keys off
334
+ for (uint8_t i = 0 ; i < MATRIX_ROWS ; i ++ ) {
335
+ matrix [i ] = 0 ;
336
+ }
337
+
338
+ }
Original file line number Diff line number Diff line change @@ -259,3 +259,38 @@ void matrix_print(void) {
259
259
printf ("\n" );
260
260
}
261
261
}
262
+
263
+ // DO NOT REMOVE
264
+ // Needed for proper wake/sleep
265
+
266
+ void matrix_power_up (void ) {
267
+ mcp23018_init ();
268
+
269
+ // outputs
270
+ setPinOutput (B10 );
271
+ setPinOutput (B11 );
272
+ setPinOutput (B12 );
273
+ setPinOutput (B13 );
274
+ setPinOutput (B14 );
275
+ setPinOutput (B15 );
276
+
277
+ // inputs
278
+ setPinInputLow (A0 );
279
+ setPinInputLow (A1 );
280
+ setPinInputLow (A2 );
281
+ setPinInputLow (A3 );
282
+ setPinInputLow (A6 );
283
+ setPinInputLow (A7 );
284
+ setPinInputLow (B0 );
285
+
286
+ memset (matrix , 0 , MATRIX_ROWS * sizeof (matrix_row_t ));
287
+ memset (matrix_debouncing , 0 , MATRIX_ROWS * sizeof (matrix_row_t ));
288
+ memset (matrix_debouncing_right , 0 , MATRIX_COLS * sizeof (matrix_row_t ));
289
+
290
+
291
+ // initialize matrix state: all keys off
292
+ for (uint8_t i = 0 ; i < MATRIX_ROWS ; i ++ ) {
293
+ matrix [i ] = 0 ;
294
+ }
295
+
296
+ }
You can’t perform that action at this time.
0 commit comments