Refactor matrix transform, positions pervasively

* Do mapping to positions right in kscan handler, and then
  surface positions throughout the API.
This commit is contained in:
Pete Johanson
2020-06-20 17:54:52 -04:00
parent d65629b9a0
commit 7e659851c8
10 changed files with 95 additions and 51 deletions

View File

@@ -23,14 +23,14 @@ static int behavior_keymap_init(struct device *dev)
return 0;
};
static int on_position_pressed(struct device *dev, u32_t row, u32_t column)
static int on_position_pressed(struct device *dev, u32_t position, u32_t _)
{
return zmk_keymap_position_state_changed(row, column, true);
return zmk_keymap_position_state_changed(position, true);
}
static int on_position_released(struct device *dev, u32_t row, u32_t column)
static int on_position_released(struct device *dev, u32_t position, u32_t _)
{
return zmk_keymap_position_state_changed(row, column, false);
return zmk_keymap_position_state_changed(position, false);
}
static const struct behavior_driver_api behavior_keymap_driver_api = {