flipperzero-firmware/firmware/targets/furi_hal_include/furi_hal_bt_serial.h
あく 389ff92cc1
Naming and coding style convention, new linter tool. (#945)
* Makefile, Scripts: new linter
* About: remove ID from IC
* Firmware: remove double define for DIVC/DIVR
* Scripts: check folder names too. Docker: replace syntax check with make lint.
* Reformat Sources and Migrate to new file naming convention
* Docker: symlink clang-format-12 to clang-format
* Add coding style guide
2022-01-05 19:10:18 +03:00

41 lines
940 B
C

#pragma once
#include "serial_service.h"
#define FURI_HAL_BT_SERIAL_PACKET_SIZE_MAX SERIAL_SVC_DATA_LEN_MAX
/** Serial service callback type */
typedef SerialServiceEventCallback FuriHalBtSerialCallback;
/** Start Serial Profile
*/
void furi_hal_bt_serial_start();
/** Stop Serial Profile
*/
void furi_hal_bt_serial_stop();
/** Set Serial service events callback
*
* @param buffer_size Applicaition buffer size
* @param calback FuriHalBtSerialCallback instance
* @param context pointer to context
*/
void furi_hal_bt_serial_set_event_callback(
uint16_t buff_size,
FuriHalBtSerialCallback callback,
void* context);
/** Notify that application buffer is empty
*/
void furi_hal_bt_serial_notify_buffer_is_empty();
/** Send data through BLE
*
* @param data data buffer
* @param size data buffer size
*
* @return true on success
*/
bool furi_hal_bt_serial_tx(uint8_t* data, uint16_t size);