remove KEYSCANNER_PROPS macro

pull/860/head
Jesse Vincent 4 years ago
parent a5081b1b38
commit ba9913e029
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -111,7 +111,10 @@ class RaiseLEDDriver : public kaleidoscope::driver::led::Base<RaiseLEDDriverProp
};
struct RaiseKeyScannerProps : public kaleidoscope::driver::keyscanner::BaseProps {
KEYSCANNER_PROPS(5, 16);
static constexpr uint8_t matrix_rows = 5;
static constexpr uint8_t matrix_columns = 16;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
static constexpr uint8_t left_columns = 8;
static constexpr uint8_t right_columns = matrix_columns - left_columns;
};

@ -48,7 +48,10 @@ namespace ez {
struct ErgoDoxProps : public kaleidoscope::device::ATmega32U4KeyboardProps {
struct KeyScannerProps : kaleidoscope::driver::keyscanner::BaseProps {
KEYSCANNER_PROPS(14, 6);
static constexpr uint8_t matrix_rows = 14;
static constexpr uint8_t matrix_columns = 6;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
};
typedef kaleidoscope::driver::bootloader::avr::HalfKay Bootloader;
static constexpr const char *short_name = "ErgoDox-EZ";

@ -73,7 +73,9 @@ class Model01LEDDriver;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
struct Model01KeyScannerProps : public kaleidoscope::driver::keyscanner::BaseProps {
KEYSCANNER_PROPS(4, 16);
static constexpr uint8_t matrix_rows = 4;
static constexpr uint8_t matrix_columns = 16;
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
};
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -34,12 +34,17 @@
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#define ATMEGA_KEYSCANNER_PROPS(ROW_PINS_, COL_PINS_) \
KEYSCANNER_PROPS(NUM_ARGS(ROW_PINS_), NUM_ARGS(COL_PINS_)); \
static constexpr uint8_t matrix_rows = NUM_ARGS(ROW_PINS_); \
static constexpr uint8_t matrix_columns = NUM_ARGS(COL_PINS_); \
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr; \
\
static constexpr uint8_t matrix_row_pins[matrix_rows] = ROW_PINS_; \
static constexpr uint8_t matrix_col_pins[matrix_columns] = COL_PINS_;
#else // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#define ATMEGA_KEYSCANNER_PROPS(ROW_PINS_, COL_PINS_) \
KEYSCANNER_PROPS(NUM_ARGS(ROW_PINS_), NUM_ARGS(COL_PINS_));
static constexpr uint8_t matrix_rows = NUM_ARGS(ROW_PINS_); \
static constexpr uint8_t matrix_columns = NUM_ARGS(COL_PINS_); \
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
#define ATMEGA_KEYSCANNER_BOILERPLATE \

@ -22,11 +22,6 @@
#include "kaleidoscope/key_defs.h"
#include "kaleidoscope/MatrixAddr.h"
#define KEYSCANNER_PROPS(ROWS_, COLS_) \
static constexpr uint8_t matrix_rows = ROWS_; \
static constexpr uint8_t matrix_columns = COLS_; \
typedef MatrixAddr<matrix_rows, matrix_columns> KeyAddr;
namespace kaleidoscope {
namespace driver {
namespace keyscanner {

Loading…
Cancel
Save