/*
Copyright 2018 listofoptions <listofoptions@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 uint16_t debouncing_time ;
static bool debouncing = false ;
static uint8_t matrix = ;
static uint8_t matrix_debounce_old = ;
static uint8_t matrix_debounce_new = ;
void
void
void
void
void
void
// the keyboard's internal wiring is such that the inputs to the logic are
// a clock signal, and a reset line.
// the output is a single output pin. im bitbanging here, but the SPI controller
// would work normally
//
// the device functions, by using the clock signal to count 128 bits, the lower
// 3 bits of this 7 bit counter are tied to a 1-of-8 multiplexer, this forms
// the columns.
// the upper 4 bits form the rows, and are decoded using bcd to decimal
// decoders, so that 14 out of 16 of the outputs are wired to the rows of the
// matrix. each switch has a diode, such that the row signal feeds into the
// switch, and then into the diode, then into one of the columns into the
// matrix. the reset pin can be used to reset the entire counter.
inline
static
void
inline
static
void
inline
static
uint8_t
inline
static
void
void
uint8_t
inline
uint8_t
void
inline
uint8_t
inline
uint8_t
// as an aside, I used the M0110 converter:
// tmk_core/common/keyboard.c, quantum/matrix.c, and the project layout of the planck
// the online ducmentation starting from :
// https://docs.qmk.fm/#/config_options
// https://docs.qmk.fm/#/understanding_qmk
// and probably a few i forgot....