/*
Copyright 2019 MechMerlin <mechmerlin@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
static uint8_t debouncing = DEBOUNCE;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix;
static matrix_row_t matrix_debouncing;
static uint8_t ;
static void ;
static void ;
static void ;
void
void
void
void
void
void
uint8_t
inline matrix_row_t
void
/* Row pin configuration
* row: 0 1 2 3 4 5
* pin: PB7 PD0 PD1 PD2 PD3 PD5
*
* Reset Key uses its own pin PE2
*/
static void
static uint8_t
/* Columns 0 - G
* These columns uses two 74HC237D 3 to 8 bit demultiplexers.
*
* atmega32u4 decoder pin
* C6 U1 E2
* B6 U2 E2
* F0 U1, U2 A0
* F1 U1, U2 A1
* C7 U1, U2 A2
*
* col 0: B4
* col 1: D7
* col I: B5
*
* col / pin: PC6 PB6 PF0 PF1 PC7 Decoder Pin
* 2: 1 0 0 0 0 U1 Y0
* 3: 1 0 1 0 0 U1 Y1
* 4: 1 0 0 1 0 U1 Y2
* 5: 1 0 1 1 0 U1 Y3
* 6: 1 0 0 0 1 U1 Y4
* 7: 1 0 1 0 1 U1 Y5
* 8: 1 0 0 1 1 U1 Y6
* 9: 1 0 1 1 1 U1 Y7
* A: 0 1 0 0 0 U2 Y0
* B: 0 1 1 0 0 U2 Y1
* C: 0 1 0 1 0 U2 Y2
* D: 0 1 1 1 0 U2 Y3
* E: 0 1 0 0 1 U2 Y4
* F: 0 1 1 0 1 U2 Y5
* G: 0 1 0 1 1 U2 Y6
* H: 0 1 1 1 1 U2 Y7
*
*/
static void
static void