/*
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 - diode connected
* row: 0 1 2 3 4 5
* pin: PD0 PD1 PD2 PD3 PD5 PB7
*
* Backspace uses its own pin PE2 on the column pin, row pin is grounded
*/
static void
static uint8_t
uint8_t
/* Columns 0 - 15
*
* atmega32u4 decoder pin
* PC6 U1 E3
* PB6 U2 E3
* PF0 U1, U2 A0
* PF1 U1, U2 A1
* PC7 U1, U2 A2
*
* These columns uses two 74HC237D 3 to 8 bit demultiplexers.
* col / pin: PC6 PB6 PF0 PF1 PC7 Decoder Pin
* 0: 1 0 0 0 0 U1 Y0
* 1: 1 0 1 0 0 U1 Y1
* 2: 1 0 0 1 0 U1 Y2
* 3: 1 0 1 1 0 U1 Y3
* 4: 1 0 0 0 1 U1 Y4
* 5: 1 0 1 0 1 U1 Y5
* 6: 1 0 0 1 1 U1 Y6
* 7: 1 0 1 1 1 U1 Y7
*
* 8: 0 1 0 0 0 U2 Y0
* 9: 0 1 1 0 0 U2 Y1
* 10: 0 1 0 1 0 U2 Y2
* 11: 0 1 1 1 0 U2 Y3
* 12: 0 1 0 0 1 U2 Y4
* 13: 0 1 1 0 1 U2 Y5
* 14: 0 1 0 1 1 U2 Y6
* 15: 0 1 1 1 1 U2 Y7
*
*/
static void
static void