flipperzero-firmware/firmware/targets/f6/ble-glue/serial_service.h
gornekich 943fb1bced
[FL-1721] Bluetooth refactoring (#747)
* ble-glue: add on connect \ disconnect, on send \ received callbacks
* bt: rework service with furi-hal-bt and callbacks
* bt: update battery level on connect
* ble-glue: set one callback with parameters
* bt: rework callbacks, remove unused API
* ble-glue: remove dead code
* furi-hal-bt: add documentation
* ble-glue: apply changes for f7 target
* bt: rename RpcInstance -> Rpc
* ble: add disconnection reason
* ble: don't open bt record from GAP
* bt: fix RPC session close
* Assets: separate targets for icons and protobuf

Co-authored-by: あく <alleteam@gmail.com>
2021-10-12 19:41:42 +03:00

26 lines
555 B
C

#pragma once
#include <stdint.h>
#include <stdbool.h>
#define SERIAL_SVC_DATA_LEN_MAX (245)
#ifdef __cplusplus
extern "C" {
#endif
typedef void(*SerialSvcDataReceivedCallback)(uint8_t* buff, uint16_t size, void* context);
typedef void(*SerialSvcDataSentCallback)(void* context);
void serial_svc_start();
void serial_svc_set_callbacks(SerialSvcDataReceivedCallback on_received_cb, SerialSvcDataSentCallback on_sent_cb, void* context);
void serial_svc_stop();
bool serial_svc_update_tx(uint8_t* data, uint8_t data_len);
#ifdef __cplusplus
}
#endif