mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-26 16:05:18 -05:00
Feature: Full-Duplex Wired Split (#2766)
refactor(split): Refactor split code for extension Extract central/peripheral code to allow for plugging in alternate transports, instead of tying all split logic to BT. feat(split): Add full-duplex wired split support * Depends on full-duplex hardware UART for communication. * Supports all existing central commands/peripheral events, including sensors/inputs from peripherals. * Only one wired split peripheral supported (for now) * Relies on chosen `zmk,split-uart` referencing the UART device. docs: Add wired split config docs. Migrate split to its own dedicated config file, and add details on wired split config. Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com> fix: Properly override stack size on RP2040 Move the system work queue stack size override on RP2040 ouf of a `ZMK_BLE` conditional so it is properly applied generally for that SoC. --------- Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
This commit is contained in:
@@ -44,7 +44,7 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t
|
||||
|
||||
#else
|
||||
|
||||
#include <zmk/split/bluetooth/service.h>
|
||||
#include <zmk/split/peripheral.h>
|
||||
|
||||
#define ZIS_INST(n) \
|
||||
static const struct zmk_input_processor_entry processors_##n[] = \
|
||||
@@ -59,8 +59,16 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t
|
||||
zmk_input_processor_handle_event(processors_##n[i].dev, evt, processors_##n[i].param1, \
|
||||
processors_##n[i].param2, NULL); \
|
||||
} \
|
||||
zmk_split_bt_report_input(DT_INST_REG_ADDR(n), evt->type, evt->code, evt->value, \
|
||||
evt->sync); \
|
||||
struct zmk_split_transport_peripheral_event ev = { \
|
||||
.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT, \
|
||||
.data = {.input_event = { \
|
||||
.reg = DT_INST_REG_ADDR(n), \
|
||||
.type = evt->type, \
|
||||
.code = evt->code, \
|
||||
.value = evt->value, \
|
||||
.sync = evt->sync, \
|
||||
}}}; \
|
||||
zmk_split_peripheral_report_event(&ev); \
|
||||
} \
|
||||
INPUT_CALLBACK_DEFINE(DEVICE_DT_GET(DT_INST_PHANDLE(n, device)), split_input_handler_##n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user