KindleBT
Bluetooth functionality for Kindle 11th gen and up
Loading...
Searching...
No Matches
kindlebt_utils.h
1#ifndef KINDLE_BT_UTILS_H
2#define KINDLE_BT_UTILS_H
3
4#include <string.h>
5
6#include "kindlebt_defines.h"
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12status_t utilsConvertStrToBdAddr(char* str, bdAddr_t* pAddr);
13uint16_t utilsConvertHexStrToByteArray(char* input, uint8_t* output);
14
19
27struct aceBT_gattCharRec_t*
28utilsFindCharRec(bleGattsService_t* services, uint32_t noSvcs, uuid_t uuid, uint8_t uuid_len);
29 // KINDLEBT_PUBLIC_API
31
32void setGattBlobFromBytes(
33 bleGattCharacteristicsValue_t* chars_value, const uint8_t* data, uint16_t size
34);
35void freeGattBlob(bleGattCharacteristicsValue_t* chars_value);
36char* utilsDumpServer(bleGattsService_t* server, char* log_buff, size_t* size, size_t* offset);
37
39device_context_t* dca_find_by_handle(device_context_array_t* arr, const bleConnHandle conn_handle);
40device_context_t* dca_find_by_addr(device_context_array_t* arr, const bdAddr_t* addr);
41bool dca_remove(device_context_array_t* arr, const bleConnHandle conn_handle);
42void dca_free(device_context_array_t* arr);
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif // KINDLE_BT_UTILS_H
aceBT_bdAddr_t bdAddr_t
Bluetooth address.
ace_status_t status_t
Bluetooth API status codes.
aceBT_bleGattsService_t bleGattsService_t
Structure for a GATT Server service.
aceBT_uuid_t uuid_t
Bluetooth UUID struct.
aceBT_bleConnHandle bleConnHandle
Connection handle for the lifetime of a Bluetooth connection.
aceBT_bleGattCharacteristicsValue_t bleGattCharacteristicsValue_t
BLE GATT Characteristic.
Internal dynamic array struct for devices context during a BLE connection.
Internal struct for certain Bluetooth conditions during a BLE connection.
struct aceBT_gattCharRec_t * utilsFindCharRec(bleGattsService_t *services, uint32_t noSvcs, uuid_t uuid, uint8_t uuid_len)
Find a GATT Characteristic Record by UUID.
Internal definitions.