forked from kofal.net/zmk
feature(split): behavior locality support.
* GATT characteristic allowing passng data + behavior label to invoke the behavior on the peripheral side. * Behaviors have a locality setting to specify where they run. * Build reset/power/RGB on peripheral.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <device.h>
|
||||
#include <bluetooth/addr.h>
|
||||
#include <drivers/kscan.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
@@ -49,8 +50,12 @@ void zmk_kscan_process_msgq(struct k_work *item) {
|
||||
uint32_t position = zmk_matrix_transform_row_column_to_position(ev.row, ev.column);
|
||||
LOG_DBG("Row: %d, col: %d, position: %d, pressed: %s", ev.row, ev.column, position,
|
||||
(pressed ? "true" : "false"));
|
||||
ZMK_EVENT_RAISE(new_zmk_position_state_changed((struct zmk_position_state_changed){
|
||||
.state = pressed, .position = position, .timestamp = k_uptime_get()}));
|
||||
ZMK_EVENT_RAISE(new_zmk_position_state_changed((struct zmk_position_state_changed) {
|
||||
#if IS_ENABLED(CONFIG_ZMK_BLE)
|
||||
.source = BT_ADDR_LE_NONE,
|
||||
#endif
|
||||
.state = pressed, .position = position, .timestamp = k_uptime_get()
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user