mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-14 07:16:04 +03:00
7170864fe4
* ble: prototype ble hid * ble: add HID service and characteristics * debug tools: add ble keyboard app * ble: change appearance * ble: working keyboard * bt: introduce furi-hal-bt-hid * bt: restart hid service on each keyboard app enter * bt: introduce switch profile * bt: add profile to ble glue * bt: working profile switch * bt: introduce bt serial profile, rework API * bt: rewotk HID profile * bt: rework gap with profile configuration * bt: move change profile routine to furi hal bt * bt: change switch profile API to blocking * bt: move battery update to furi hal bt * bt: cleanup * bt: add support for f6 target * bt: update documentation * bt: clean up code * bt: remove NO OUTPUT setting * bt: set numeric comparison pairing in BLE HID * bt: support f6 target * bt: set mac address in profile configuration * bt: set advertise name in profile config * bt: rework with furi thread * bt: support f6 target * bt: clear hci command buffer on core2 restart * bt: correct thread kill sequence * bt: fix freertos functions calls * bt: add some enterprise delays fo correct memory free * bt: code cleanup * bt: change terminate -> stop * bt: fix memory leakage Co-authored-by: あく <alleteam@gmail.com>
38 lines
927 B
C
38 lines
927 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);
|