Added KeyAddr and numKeys() to all hardware classes

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
pull/640/head
Florian Fleissner 6 years ago committed by Jesse Vincent
parent 77bdd0c0a1
commit 2cd9d22ee3

@ -21,6 +21,8 @@
#pragma once
#include "kaleidoscope/MatrixAddr.h"
#ifndef CRGB
#error cRGB and CRGB *must* be defined before including this header!
#endif

@ -56,6 +56,11 @@ class ErgoDox : public kaleidoscope::Hardware {
static constexpr byte matrix_rows = 14;
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
void scanMatrix(void);
void readMatrix(void);
void actOnMatrixScan(void);

@ -45,6 +45,11 @@ class KBD4x: public kaleidoscope::hardware::ATMegaKeyboard {
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
void resetDevice();
};

@ -43,6 +43,11 @@ class Model01 : public kaleidoscope::Hardware {
static constexpr byte matrix_columns = 16;
static constexpr int8_t led_count = 64;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
void syncLeds(void);
void setCrgbAt(byte row, byte col, cRGB color);
void setCrgbAt(int8_t i, cRGB crgb);

@ -41,6 +41,11 @@ class Planck: public kaleidoscope::hardware::ATMegaKeyboard {
);
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
};
#define PER_KEY_DATA(dflt, \

@ -50,6 +50,11 @@ class Splitography: public kaleidoscope::hardware::ATMegaKeyboard {
);
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
};
#define PER_KEY_DATA(dflt, \

@ -65,6 +65,11 @@ class Atreus: public kaleidoscope::hardware::ATMegaKeyboard {
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
void resetDevice();
protected:

@ -43,6 +43,11 @@ class Atreus2: public kaleidoscope::hardware::ATMegaKeyboard {
)
static constexpr int8_t led_count = 0;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr int8_t numKeys() {
return matrix_columns * matrix_rows;
}
void resetDevice();
protected:

Loading…
Cancel
Save