feat(split): Add data transfer event
This commit is contained in:
parent
ff7e0b7e48
commit
ef8ab95d7c
4 changed files with 29 additions and 0 deletions
|
@ -89,6 +89,7 @@ target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
|
|||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_data_xfer_event.c)
|
||||
add_subdirectory(src/split)
|
||||
|
||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
||||
|
|
17
app/include/zmk/events/split_data_xfer_event.h
Normal file
17
app/include/zmk/events/split_data_xfer_event.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/split/bluetooth/service.h>
|
||||
|
||||
struct zmk_split_data_xfer_event {
|
||||
struct zmk_split_data_xfer_data data_xfer;
|
||||
};
|
||||
|
||||
ZMK_EVENT_DECLARE(zmk_split_data_xfer_event);
|
10
app/src/events/split_data_xfer_event.c
Normal file
10
app/src/events/split_data_xfer_event.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zmk/events/split_data_xfer_event.h>
|
||||
|
||||
ZMK_EVENT_IMPL(zmk_split_data_xfer_event);
|
|
@ -28,6 +28,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
|
||||
#include <zmk/events/sensor_event.h>
|
||||
#include <zmk/sensors.h>
|
||||
#include <zmk/events/split_data_xfer_event.h>
|
||||
|
||||
#if ZMK_KEYMAP_HAS_SENSORS
|
||||
static struct sensor_event last_sensor_event;
|
||||
|
|
Loading…
Add table
Reference in a new issue