unleashed-firmware/applications/rpc/rpc_status.c
SG b85a50f912
[FL-1792] RPC service (#698)
* Lib: added nanopb
* Hal rfid: fixed confused arguments
* Lib: update makefile, include nanopb
* Lib: remove nanopb
* Lib: add nanopb as submodule
* Assets: remove protobuf
* Assets: add protobuf message definitions as submodule
* WIP: [FL-1792] Add Protobuf RPC
* WIP: RPC add ping
* Add Ping
* Fix Ping, Add (WIP) storage
* Update submodule
* ble-glue: add ptotobuf to ble
* WIP: Add storage list test
* revert applications.mk
* Add Storage List command
* ble-glue: fix fast updating rx charachteristic
* ble serial: split long ble packets
* Add Storage Read/Write/Mkdir/Delete
* Disable tests
* Rename Element -> File
* Add md5sum, fix test leak
* Regenerate Protobuf
* Fix review comments
* ble-glue: sync f7 target

Co-authored-by: Albert Kharisov <albert@flipperdevices.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2021-10-12 14:48:34 +03:00

26 lines
740 B
C

#include "flipper.pb.h"
#include "rpc_i.h"
#include "status.pb.h"
void rpc_system_status_ping_process(const PB_Main* msg_request, void* context) {
PB_Main msg_response = PB_Main_init_default;
msg_response.has_next = false;
msg_response.command_status = PB_CommandStatus_OK;
msg_response.command_id = msg_request->command_id;
msg_response.which_content = PB_Main_ping_response_tag;
rpc_encode_and_send(context, &msg_response);
}
void* rpc_system_status_alloc(Rpc* rpc) {
RpcHandler rpc_handler = {
.message_handler = rpc_system_status_ping_process,
.decode_submessage = NULL,
.context = rpc,
};
rpc_add_handler(rpc, PB_Main_ping_request_tag, &rpc_handler);
return NULL;
}