unleashed-firmware/applications/debug/rpc_debug_app/rpc_debug_app.h
Georgii Surkov 0261dc3075
[FL-2957] Unified Info API, App Error, Data Xchange (#1998)
* Update protobuf definitions
* Add Property subsystem entry point function
* Key-based system info and power info function stubs
* Remove unneeded functions
* Working power info
* Working system info
* Replace #defines with string literals
* Remove unneeded field
* Simplify system info formatting
* Refactor output callback handling
* Handle the last info element correctly
* Optimise power info, rename methods
* Add comments
* Add power debug
* Remove unneeded definitions
* Rename some files and functions
* Update protobuf definitions
* Implement App GetError and DataExchange APIs
* Send GetErrorReply with correct command_id
* Add RPC debug app stub
* Add more scenes
* Add warning, increase stack size
* Add receive data exchange scene
* Improve data exchange
* Add notifications
* Update application requirements
* Bump format version for property-based infos
* Correctly reset error text
* RCP: sync protobuf repo to latest release tag

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-11-29 18:08:08 +09:00

55 lines
1.3 KiB
C

#pragma once
#include <furi.h>
#include <gui/gui.h>
#include <gui/view.h>
#include <gui/scene_manager.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/widget.h>
#include <gui/modules/submenu.h>
#include <gui/modules/text_box.h>
#include <gui/modules/text_input.h>
#include <gui/modules/byte_input.h>
#include <rpc/rpc_app.h>
#include <notification/notification_messages.h>
#include "scenes/rpc_debug_app_scene.h"
#define DATA_STORE_SIZE 64U
#define TEXT_STORE_SIZE 64U
typedef struct {
Gui* gui;
RpcAppSystem* rpc;
SceneManager* scene_manager;
ViewDispatcher* view_dispatcher;
NotificationApp* notifications;
Widget* widget;
Submenu* submenu;
TextBox* text_box;
TextInput* text_input;
ByteInput* byte_input;
char text_store[TEXT_STORE_SIZE];
uint8_t data_store[DATA_STORE_SIZE];
} RpcDebugApp;
typedef enum {
RpcDebugAppViewWidget,
RpcDebugAppViewSubmenu,
RpcDebugAppViewTextBox,
RpcDebugAppViewTextInput,
RpcDebugAppViewByteInput,
} RpcDebugAppView;
typedef enum {
// Reserve first 100 events for button types and indexes, starting from 0
RpcDebugAppCustomEventInputErrorCode = 100,
RpcDebugAppCustomEventInputErrorText,
RpcDebugAppCustomEventInputDataExchange,
RpcDebugAppCustomEventRpcDataExchange,
} RpcDebugAppCustomEvent;