diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-06-20 17:54:52 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-06-20 17:54:52 -0400 |
commit | 7e659851c80bf2819554d93ad9971f56aa5b225b (patch) | |
tree | b0d2ee4784741cbcd3e109b71230502d87691e1b /app/include | |
parent | d65629b9a0b79b6e294419fe9a4118fb09491c91 (diff) |
Refactor matrix transform, positions pervasively
* Do mapping to positions right in kscan handler, and then
surface positions throughout the API.
Diffstat (limited to 'app/include')
-rw-r--r-- | app/include/zmk/events.h | 4 | ||||
-rw-r--r-- | app/include/zmk/keymap.h | 2 | ||||
-rw-r--r-- | app/include/zmk/matrix_transform.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/app/include/zmk/events.h b/app/include/zmk/events.h index 9314b9d..ac4815a 100644 --- a/app/include/zmk/events.h +++ b/app/include/zmk/events.h @@ -1,7 +1,7 @@ #pragma once -int zmk_events_position_pressed(u32_t row, u32_t column); -int zmk_events_position_released(u32_t row, u32_t column); +int zmk_events_position_pressed(u32_t position); +int zmk_events_position_released(u32_t position); int zmk_events_keycode_pressed(u32_t keycode); int zmk_events_keycode_released(u32_t keycode); int zmk_events_mod_pressed(u32_t modifier); diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 7866cd5..cf38904 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -11,4 +11,4 @@ bool zmk_keymap_layer_activate(u8_t layer); bool zmk_keymap_layer_deactivate(u8_t layer); -int zmk_keymap_position_state_changed(u32_t row, u32_t column, bool pressed); +int zmk_keymap_position_state_changed(u32_t position, bool pressed); diff --git a/app/include/zmk/matrix_transform.h b/app/include/zmk/matrix_transform.h new file mode 100644 index 0000000..e9e969a --- /dev/null +++ b/app/include/zmk/matrix_transform.h @@ -0,0 +1,3 @@ +#pragma once + +u32_t zmk_matrix_transform_row_column_to_position(u32_t row, u32_t column);
\ No newline at end of file |