mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
[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>
This commit is contained in:
@@ -14,6 +14,8 @@ typedef enum {
|
||||
} RpcAppSystemEvent;
|
||||
|
||||
typedef void (*RpcAppSystemCallback)(RpcAppSystemEvent event, void* context);
|
||||
typedef void (
|
||||
*RpcAppSystemDataExchangeCallback)(const uint8_t* data, size_t data_size, void* context);
|
||||
|
||||
typedef struct RpcAppSystem RpcAppSystem;
|
||||
|
||||
@@ -27,6 +29,17 @@ const char* rpc_system_app_get_data(RpcAppSystem* rpc_app);
|
||||
|
||||
void rpc_system_app_confirm(RpcAppSystem* rpc_app, RpcAppSystemEvent event, bool result);
|
||||
|
||||
void rpc_system_app_set_error_code(RpcAppSystem* rpc_app, uint32_t error_code);
|
||||
|
||||
void rpc_system_app_set_error_text(RpcAppSystem* rpc_app, const char* error_text);
|
||||
|
||||
void rpc_system_app_set_data_exchange_callback(
|
||||
RpcAppSystem* rpc_app,
|
||||
RpcAppSystemDataExchangeCallback callback,
|
||||
void* ctx);
|
||||
|
||||
void rpc_system_app_exchange_data(RpcAppSystem* rpc_app, const uint8_t* data, size_t data_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user