kindlebt
Bluetooth functionality for Kindle 11th gen and up
Loading...
Searching...
No Matches
kindlebt_defines.h
Go to the documentation of this file.
1
11
12#ifndef KINDLE_BT_DEFINES_H
13#define KINDLE_BT_DEFINES_H
14
15#include <pthread.h>
16#include <stdbool.h>
17
18#include <ace/bluetooth_ble_api.h>
19#include <ace/bluetooth_ble_defines.h>
20#include <ace/bluetooth_ble_gatt_client_api.h>
21#include <ace/bluetooth_defines.h>
22#include <ace/bluetooth_session_api.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
40
48#define MAC_ADDR_LEN ACEBT_MAC_ADDR_LEN
52#define MAC_ADDR_STR_LEN ACEBT_MAC_ADDR_STR_LEN
54
63#define BLE_FORMAT_UINT8 ACEBT_BLE_FORMAT_UINT8
65#define BLE_FORMAT_UINT16 ACEBT_BLE_FORMAT_UINT16
67#define BLE_FORMAT_UINT32 ACEBT_BLE_FORMAT_UINT32
69#define BLE_FORMAT_SINT8 ACEBT_BLE_FORMAT_SINT8
71#define BLE_FORMAT_SINT16 ACEBT_BLE_FORMAT_SINT16
73#define BLE_FORMAT_SINT32 ACEBT_BLE_FORMAT_SINT32
75#define BLE_FORMAT_SFLOAT ACEBT_BLE_FORMAT_SFLOAT
77#define BLE_FORMAT_FLOAT ACEBT_BLE_FORMAT_FLOAT
79#define BLE_FORMAT_BLOB ACEBT_BLE_FORMAT_BLOB
81
85typedef aceBT_state_t state_t;
89typedef ace_status_t status_t;
93typedef aceBT_bdAddr_t bdAddr_t;
97typedef aceBT_bondState_t bondState_t;
101typedef aceBT_UUIDType_t UUIDType_t;
107typedef aceBT_uuid_t uuid_t;
111typedef aceBT_responseType_t responseType_t;
112
116typedef aceBT_sessionHandle sessionHandle;
120typedef aceBT_sessionType_t sessionType_t;
121
125typedef aceBT_bleConnHandle bleConnHandle;
129typedef aceBT_bleConnState_t bleConnState_t;
133typedef aceBt_bleConnParam_t bleConnParam_t;
137typedef aceBT_bleConnRole_t bleConnRole_t;
141typedef aceBt_bleConnPriority_t bleConnPriority_t;
142
146typedef aceBT_gattStatus_t gattStatus_t;
150typedef aceBt_bleAppId_t bleAppId_t;
154typedef aceBT_bleGattsService_t bleGattsService_t;
158typedef aceBT_bleGattAttributeFormat bleGattAttributeFormat;
165typedef aceBT_bleGattBlobValue_t bleGattBlobValue_t;
169typedef aceBT_bleGattCharacteristicsValue_t bleGattCharacteristicsValue_t;
173typedef aceBT_bleGattDescriptor_t bleGattDescriptor_t;
177typedef aceBT_bleGattRecord_t bleGattRecord_t;
181typedef aceBT_bleGattServiceType_t bleGattServiceType_t;
182
192typedef aceBT_commonCallbacks_t commonCallbacks_t;
199typedef aceBT_bleCallbacks_t bleCallbacks_t;
206typedef aceBT_bleGattClientCallbacks_t bleGattClientCallbacks_t;
207 // DARKROOT_DS
209
221
233typedef struct {
234 bool bt_enabled;
235 bool ble_registered;
236 bool mtu_set;
237 bool gattc_connected;
238 bool gattc_disconnected;
239 bool gattc_discovered;
240 bool got_gatt_db;
242
250extern uint32_t gNo_svc;
259 // KINDLEBT_DS
261
262#ifdef __cplusplus
263}
264#endif
265
266#endif // KINDLE_BT_DEFINES_H
aceBT_bleGattRecord_t bleGattRecord_t
BLE GATT Record (ATT attributes)
aceBt_bleConnParam_t bleConnParam_t
BLE connection parameters.
aceBT_bleGattClientCallbacks_t bleGattClientCallbacks_t
Callback struct of GATT Client Bluetooth operations.
aceBT_state_t state_t
Bluetooth radio state.
aceBt_bleAppId_t bleAppId_t
BLE application type.
aceBT_responseType_t responseType_t
Type of write operation for a BLE characteristic.
aceBT_bleConnState_t bleConnState_t
BLE connection state.
aceBT_bleCallbacks_t bleCallbacks_t
Callback struct of LE Bluetooth operations.
aceBT_UUIDType_t UUIDType_t
Bluetooth UUID types.
aceBT_bdAddr_t bdAddr_t
Bluetooth address.
ace_status_t status_t
Bluetooth API status codes.
aceBT_bleGattBlobValue_t bleGattBlobValue_t
BLE blob value.
aceBT_bleConnRole_t bleConnRole_t
BLE connection role.
aceBT_bleGattsService_t bleGattsService_t
Structure for a GATT Server service.
aceBT_bleGattDescriptor_t bleGattDescriptor_t
BLE GATT Descriptor.
aceBT_uuid_t uuid_t
Bluetooth UUID struct.
aceBT_bleGattServiceType_t bleGattServiceType_t
BLE GATT service type.
aceBT_bleGattAttributeFormat bleGattAttributeFormat
BLE attribute format.
aceBT_bleConnHandle bleConnHandle
Connection handle for the lifetime of a Bluetooth connection.
aceBt_bleConnPriority_t bleConnPriority_t
BLE connection priority.
aceBT_commonCallbacks_t commonCallbacks_t
Callback struct of common Classic/LE Bluetooth operations.
aceBT_sessionHandle sessionHandle
Session handle for the lifetime of the Bluetooth application.
aceBT_bleGattCharacteristicsValue_t bleGattCharacteristicsValue_t
BLE GATT Characteristic.
aceBT_gattStatus_t gattStatus_t
BLE GATT status.
aceBT_sessionType_t sessionType_t
Bluetooth session type (Classic, Low Energy, Dual)
aceBT_bondState_t bondState_t
Bluetooth bond state.
bleConnHandle ble_conn_handle
Internal BLE connection handle.
bleGattsService_t * pGgatt_service
Internal reference to a GATT service.
bleCallbackVars_t callback_vars
Internal bleCallbackVars_t.
uint32_t gNo_svc
Internal number of GATT services, often paired with pGgatt_service.
Internal struct for certain Bluetooth conditions.