refactor(splits): Use index for event source.

* Track peripherals by indexes slot, with all appropiate peripheral
  state stored in the slot.
* Event sources tracked by peripheral slot index.
This commit is contained in:
Peter Johanson
2022-01-02 04:55:30 +00:00
committed by Pete Johanson
parent e8540f17fc
commit 9297c5f2b4
8 changed files with 252 additions and 103 deletions

View File

@@ -4,5 +4,5 @@
#include <bluetooth/addr.h>
#include <zmk/behavior.h>
int zmk_split_bt_invoke_behavior(const bt_addr_le_t *source, struct zmk_behavior_binding *binding,
int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding,
struct zmk_behavior_binding_event event, bool state);