forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add full notification support, including mapping local events to RPC notifications by a given subsystem. * New meta responses for "no response" and "unlock needed". * Initial basic lock state support in a new core section, and allow specifying if a given RPC callback requires unlocked state or not. * Add behavior subsystem with full metadata support and examples of using callback to serialize a repeated field without extra stack space needed.
- Loading branch information
1 parent
0f0f3dd
commit 5e408c5
Showing
20 changed files
with
494 additions
and
138 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
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,9 @@ | ||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <zephyr/linker/linker-defs.h> | ||
|
||
ITERABLE_SECTION_ROM(zmk_rpc_event_mapper, 4) |
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 @@ | ||
|
||
#pragma once | ||
|
||
#include <zmk/event_manager.h> | ||
|
||
enum zmk_studio_core_lock_state { | ||
ZMK_STUDIO_CORE_LOCK_STATE_LOCKED = 0, | ||
ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKING = 1, | ||
ZMK_STUDIO_CORE_LOCK_STATE_UNLOCKED = 2, | ||
}; | ||
|
||
struct zmk_studio_core_lock_state_changed { | ||
enum zmk_studio_core_lock_state state; | ||
}; | ||
|
||
ZMK_EVENT_DECLARE(zmk_studio_core_lock_state_changed); | ||
|
||
enum zmk_studio_core_lock_state zmk_studio_core_get_lock_state(void); | ||
|
||
void zmk_studio_core_unlock(); | ||
void zmk_studio_core_lock(); | ||
void zmk_studio_core_initiate_unlock(); | ||
void zmk_studio_core_complete_unlock(); |
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
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
zmk.behaviors.GetBehaviorDetailsResponse.friendly_name max_size:20 | ||
zmk.behaviors.BehaviorBindingParameterStandard.name max_size:20 | ||
zmk.behaviors.BehaviorParameterValueDescription.name max_size:32 |
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
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
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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
|
||
zephyr_linker_sources(DATA_SECTIONS ../../include/linker/zmk-rpc-subsystems.ld) | ||
zephyr_linker_sources(SECTIONS ../../include/linker/zmk-rpc-subsystem-handlers.ld) | ||
zephyr_linker_sources(SECTIONS ../../include/linker/zmk-rpc-event-mappers.ld) | ||
|
||
target_sources(app PRIVATE common.c) | ||
target_sources(app PRIVATE rpc.c) | ||
target_sources(app PRIVATE core.c) | ||
target_sources(app PRIVATE behavior_subsystem.c) | ||
target_sources(app PRIVATE core_subsystem.c) | ||
target_sources_ifdef(CONFIG_ZMK_STUDIO_INTERFACE_UART app PRIVATE uart_rpc_interface.c) | ||
target_sources_ifdef(CONFIG_ZMK_STUDIO_INTERFACE_BLE app PRIVATE gatt_rpc_interface.c) |
Oops, something went wrong.