-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(split): Test peripheral run behavior.
Add test for triggering local behaviors on split peripherals.
- Loading branch information
1 parent
53c6b52
commit 58e6f2e
Showing
6 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/peripheral 0 /p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_ZMK_SPLIT=y |
19 changes: 19 additions & 0 deletions
19
app/tests/ble/split/run-peripheral-behavior/nrf52_bsim.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/bt.h> | ||
#include <dt-bindings/zmk/keys.h> | ||
|
||
&kscan { | ||
/delete-property/ exit-after; | ||
events = <>; | ||
}; | ||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&kp A &kp B | ||
&kp C &sys_reset>; | ||
}; | ||
}; | ||
}; |
10 changes: 10 additions & 0 deletions
10
app/tests/ble/split/run-peripheral-behavior/peripheral.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
#include <dt-bindings/zmk/kscan_mock.h> | ||
|
||
|
||
&kscan { | ||
events = | ||
<ZMK_MOCK_RELEASE(0,0,5000) | ||
ZMK_MOCK_PRESS(1,1,5000) | ||
ZMK_MOCK_RELEASE(1,1,200)>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
./ble_test_central.exe -d=2 | ||
./tests_ble_split_run-peripheral-behavior__peripheral.exe -d=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
peripheral 0 OS build 87fa801c5b91 *** | ||
peripheral 0 <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) | ||
peripheral 0 <inf> bt_hci_core: HW Variant: nRF52x (0x0002) | ||
peripheral 0 <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.5 Build 0 | ||
peripheral 0 <wrn> bt_id: No static addresses stored in controller | ||
peripheral 0 <inf> bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random) | ||
peripheral 0 <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1 | ||
peripheral 0 <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff | ||
peripheral 0 <dbg> zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 | ||
peripheral 0 <inf> zmk: Welcome to ZMK! | ||
peripheral 0 <dbg> zmk: security_changed: Security changed: FD:9E:B2:48:47:39 (random) level 2 | ||
peripheral 0 <dbg> zmk: split_svc_pos_state_ccc: value 1 | ||
peripheral 0 <dbg> zmk: split_svc_select_phys_layout_callback: Selecting physical layout after GATT write of 0 | ||
peripheral 0 <dbg> zmk: kscan_mock_work_handler_0: ev 327680000 row 0 column 0 state 0 | ||
peripheral 0 <dbg> zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 | ||
peripheral 0 <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 0, col: 0, position: 0, pressed: false | ||
peripheral 0 <dbg> zmk: split_listener: | ||
peripheral 0 <dbg> zmk: kscan_mock_work_handler_0: ev 2475163905 row 1 column 1 state 1 | ||
peripheral 0 <dbg> zmk: kscan_mock_schedule_next_event_0: delaying next keypress: 5000 | ||
peripheral 0 <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 3, pressed: true | ||
peripheral 0 <dbg> zmk: split_listener: | ||
peripheral 0 <dbg> zmk: split_svc_run_behavior: offset 0 len 20 | ||
peripheral 0 <dbg> zmk: split_svc_run_behavior: sysreset with params 0 0: pressed? 1 |