/*
Copyright 2017-2019 Mathias Andersson <wraul@dbox.se>
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 const pin_t row_pins = MATRIX_ROW_PINS;
static const pin_t col_pins = MATRIX_COL_PINS;
/* matrix state(1:on, 0:off) */
static matrix_row_t raw_matrix; // raw values
static matrix_row_t matrix; // debounced values
void
void
void
void
void
void
inline uint8_t
inline uint8_t
inline bool
inline matrix_row_t
void
uint8_t
/* Columns 0 - 15
* These columns uses two 74HC237D 3 to 8 bit demultiplexers.
* col / pin: PB6 PC6 PC7 PF1 PF0
* 0: 0 1 0 0 0
* 1: 0 1 0 0 1
* 2: 0 1 0 1 0
* 3: 0 1 0 1 1
* 4: 0 1 1 0 0
* 5: 0 1 1 0 1
* 6: 0 1 1 1 0
* 7: 0 1 1 1 1
* 8: 1 0 0 0 0
* 9: 1 0 0 0 1
* 10: 1 0 0 1 0
* 11: 1 0 0 1 1
* 12: 1 0 1 0 0
* 13: 1 0 1 0 1
* 14: 1 0 1 1 0
* 15: 1 0 1 1 1
*
* col: 16
* pin: PB5
*/
static void
static void
/* Row pin configuration
* row: 0 1 2 3 4 5
* pin: D0 D1 D2 D3 D5 B7
*
* Caps lock uses its own pin E2
*/
static void
static bool
void
uint8_t