Merge pull request #873 from keyboardio/configurable-keyscan-prop

Make the keyscan_interval prop of the keyscanner configurable.
pull/876/head v1.98.0
Gergely Nagy 5 years ago committed by GitHub
commit 61e3913fe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,6 +33,8 @@ namespace keyboardio {
struct AtreusProps : kaleidoscope::device::ATmega32U4KeyboardProps {
struct KeyScannerProps : public kaleidoscope::driver::keyscanner::ATmegaProps {
static const uint16_t keyscan_interval = 2700;
static constexpr uint8_t matrix_rows = 4;
static constexpr uint8_t matrix_columns = 12;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;

@ -35,6 +35,8 @@ namespace keyscanner {
struct ATmegaProps: kaleidoscope::driver::keyscanner::BaseProps {
static const uint8_t debounce = 3;
static const uint16_t keyscan_interval = 1700;
/*
* The following two lines declare an empty array. Both of these must be
@ -75,7 +77,7 @@ class ATmega: public kaleidoscope::driver::keyscanner::Base<_KeyScannerProps> {
}
/* Set up Timer1 for 1700usec */
setScanCycleTime(1700);
setScanCycleTime(_KeyScannerProps::keyscan_interval);
}
void setScanCycleTime(uint16_t c) {

Loading…
Cancel
Save