You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.4 KiB
58 lines
1.4 KiB
7 years ago
|
/* -*- mode: c++ -*-
|
||
7 years ago
|
* Kaleidoscope-Hardware-EZ-ErgoDox -- ErgoDox hardware support for Kaleidoscope
|
||
5 years ago
|
* Copyright (C) 2018, 2019 Keyboard.io, Inc
|
||
7 years ago
|
*
|
||
7 years ago
|
* Based on QMK (commit 8cdb4a915)
|
||
|
* (C) Jack Humbert, Erez Zukerman, Oleg Kostyuk
|
||
|
* Original QMK sources:
|
||
|
* - keyboards/ergodox_ez/ergodox_ez.c
|
||
|
* - keyboards/ergodox_ez/ergodox_ez.h
|
||
|
* - keyboards/ergodox_ez/matrix.c
|
||
7 years ago
|
*
|
||
7 years ago
|
* 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 3 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/>.
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
6 years ago
|
#ifdef ARDUINO_AVR_ERGODOX
|
||
|
|
||
7 years ago
|
#include <Arduino.h>
|
||
|
|
||
|
namespace kaleidoscope {
|
||
5 years ago
|
namespace device {
|
||
6 years ago
|
namespace ez {
|
||
7 years ago
|
|
||
|
class ErgoDoxScanner {
|
||
|
public:
|
||
|
ErgoDoxScanner() {}
|
||
|
|
||
|
void begin();
|
||
6 years ago
|
void toggleATMegaRow(int row);
|
||
|
void selectExtenderRow(int row);
|
||
7 years ago
|
uint8_t readCols(int row);
|
||
|
|
||
7 years ago
|
void reattachExpanderOnError();
|
||
|
|
||
7 years ago
|
private:
|
||
|
uint8_t expander_error_ = 0x20;
|
||
|
|
||
|
uint8_t initExpander();
|
||
|
};
|
||
|
|
||
6 years ago
|
}
|
||
7 years ago
|
}
|
||
|
}
|
||
6 years ago
|
|
||
|
#endif
|