diff options
author | Zach White <skullydazed@gmail.com> | 2021-07-14 10:30:28 -0700 |
---|---|---|
committer | Zach White <skullydazed@gmail.com> | 2021-07-14 10:30:28 -0700 |
commit | 44d322623eb875f6eb2e0a317c76af2d47f7a9dc (patch) | |
tree | ab722bcc4cea4e4ed16f0a5dce0602fe1f2c63e5 /keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h | |
parent | 52cfc9259b58a3a11a244fbe35c49c7dd1a9cae0 (diff) | |
parent | ffdfe3798bc7bd374991abe8f10494f2e73aedd5 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Resolved Conflicts:
keyboards/checkerboards/nop60/info.json
Diffstat (limited to 'keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h')
-rw-r--r-- | keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h new file mode 100644 index 0000000000..e0cf528919 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/matrix_fast/matrix_extr.h @@ -0,0 +1,36 @@ +#pragma once +// clang-format off + +#define DIRECT_SWITCH 1 +#define DIODE_ROW2COL 2 +#define DIODE_COL2ROW 3 + +#ifndef ROW2COL +# define COL2ROW 0 +# define ROW2COL 1 +#endif + +#ifdef DIRECT_PINS +# define MATRIX_TYPE DIRECT_SWITCH +#else +# if DIODE_DIRECTION == ROW2COL +# define MATRIX_TYPE DIODE_ROW2COL +# endif +# if DIODE_DIRECTION == COL2ROW +# define MATRIX_TYPE DIODE_COL2ROW +# endif +#endif + +#ifndef MATRIX_TYPE +# error "MATRIX_TYPE could not be determined." +#endif + +#if (MATRIX_ROWS <= 8) +typedef uint8_t matrix_col_t; +#elif (MATRIX_ROWS <= 16) +typedef uint16_t matrix_col_t; +#elif (MATRIX_ROWS <= 32) +typedef uint32_t matrix_col_t; +#else +# error "MATRIX_ROWS: invalid value" +#endif |