mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-23 22:45:17 -05:00
* UART and BLE/GATT transports for a protobuf encoded RPC request/response protocol. * Custom framing protocol is used to frame a give message. * Requests/responses are divided into major "subsystems" which handle requests and create response messages. * Notification support, including mapping local events to RPC notifications by a given subsystem. * 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. Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
31 lines
709 B
C
31 lines
709 B
C
/*
|
|
* Copyright (c) 2024 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#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_UNLOCKED = 1,
|
|
};
|
|
|
|
struct zmk_studio_core_lock_state_changed {
|
|
enum zmk_studio_core_lock_state state;
|
|
};
|
|
|
|
struct zmk_studio_core_unlock_requested {};
|
|
|
|
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();
|
|
|
|
void zmk_studio_core_reschedule_lock_timeout(); |