Let keyIndex-macro use KeyAddr

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
pull/640/head
Florian Fleissner 5 years ago committed by Jesse Vincent
parent 6383e0e5bd
commit 986e3b407c

@ -28,8 +28,8 @@
* We're using a macro instead of a constexpr so that it is evaluated lazily,
* when `HARDWARE_IMPLEMENTATION` can be properly resolved.
*/
#define keyIndex(row,col) \
(uint8_t)((row * HARDWARE_IMPLEMENTATION::matrix_columns) + col + 1)
#define keyIndex(row,col) \
(uint8_t)(KeyAddr(row, col).toInt() + 1)
constexpr uint8_t R0C0 = keyIndex(0, 0);
constexpr uint8_t R0C1 = keyIndex(0, 1);

Loading…
Cancel
Save