b85a50f912
* 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>
17 lines
577 B
C
17 lines
577 B
C
#pragma once
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include "cmsis_os.h"
|
|
|
|
typedef struct Rpc Rpc;
|
|
typedef struct RpcSession RpcSession;
|
|
|
|
typedef void (*RpcSendBytesCallback)(void* context, uint8_t* bytes, size_t bytes_len);
|
|
|
|
RpcSession* rpc_open_session(Rpc* rpc);
|
|
void rpc_close_session(RpcSession* session);
|
|
/* WARN: can't call RPC API within RpcSendBytesCallback */
|
|
void rpc_set_send_bytes_callback(RpcSession* session, RpcSendBytesCallback callback, void* context);
|
|
size_t
|
|
rpc_feed_bytes(RpcSession* session, uint8_t* encoded_bytes, size_t size, TickType_t timeout);
|