kindlebt
Bluetooth functionality for Kindle 11th gen and up
Loading...
Searching...
No Matches
kindlebt_defines.h File Reference

Detailed Description

Internal definitions.

This file contains some internal structures used in kindlebt as well as some typedefs of internal darkroot data structures. For more information on some of these types, you should get the darkroot subproject from the Meson project, and from there you can check it out locally and look through it.

See also
Darkroot

Definition in file kindlebt_defines.h.

Go to the source code of this file.

Data Structures

struct  bleCallbackVars_t
 Internal struct for certain Bluetooth conditions. More...
 

Macros

MAC address
#define MAC_ADDR_LEN   ACEBT_MAC_ADDR_LEN
 MAC address length.
 
#define MAC_ADDR_STR_LEN   ACEBT_MAC_ADDR_STR_LEN
 MAC address string representation length (XX:XX:XX:XX:XX:XX)
 
BLE attribute format

Attribute format used for bleGattAttributeFormat

#define BLE_FORMAT_UINT8   ACEBT_BLE_FORMAT_UINT8
 UINT8 format.
 
#define BLE_FORMAT_UINT16   ACEBT_BLE_FORMAT_UINT16
 UINT16 format.
 
#define BLE_FORMAT_UINT32   ACEBT_BLE_FORMAT_UINT32
 UINT32 format.
 
#define BLE_FORMAT_SINT8   ACEBT_BLE_FORMAT_SINT8
 SINT8 format.
 
#define BLE_FORMAT_SINT16   ACEBT_BLE_FORMAT_SINT16
 SINT16 format.
 
#define BLE_FORMAT_SINT32   ACEBT_BLE_FORMAT_SINT32
 SINT32 format.
 
#define BLE_FORMAT_SFLOAT   ACEBT_BLE_FORMAT_SFLOAT
 SFLOAT format.
 
#define BLE_FORMAT_FLOAT   ACEBT_BLE_FORMAT_FLOAT
 FLOAT format.
 
#define BLE_FORMAT_BLOB   ACEBT_BLE_FORMAT_BLOB
 BLOB format.
 

Typedefs

typedef aceBT_state_t state_t
 Bluetooth radio state.
 
typedef ace_status_t status_t
 Bluetooth API status codes.
 
typedef aceBT_bdAddr_t bdAddr_t
 Bluetooth address.
 
typedef aceBT_bondState_t bondState_t
 Bluetooth bond state.
 
typedef aceBT_UUIDType_t UUIDType_t
 Bluetooth UUID types.
 
typedef aceBT_uuid_t uuid_t
 Bluetooth UUID struct.
 
typedef aceBT_responseType_t responseType_t
 Type of write operation for a BLE characteristic.
 
typedef aceBT_sessionHandle sessionHandle
 Session handle for the lifetime of the Bluetooth application.
 
typedef aceBT_sessionType_t sessionType_t
 Bluetooth session type (Classic, Low Energy, Dual)
 
typedef aceBT_bleConnHandle bleConnHandle
 Connection handle for the lifetime of a Bluetooth connection.
 
typedef aceBT_bleConnState_t bleConnState_t
 BLE connection state.
 
typedef aceBt_bleConnParam_t bleConnParam_t
 BLE connection parameters.
 
typedef aceBT_bleConnRole_t bleConnRole_t
 BLE connection role.
 
typedef aceBt_bleConnPriority_t bleConnPriority_t
 BLE connection priority.
 
typedef aceBT_gattStatus_t gattStatus_t
 BLE GATT status.
 
typedef aceBt_bleAppId_t bleAppId_t
 BLE application type.
 
typedef aceBT_bleGattsService_t bleGattsService_t
 Structure for a GATT Server service.
 
typedef aceBT_bleGattAttributeFormat bleGattAttributeFormat
 BLE attribute format.
 
typedef aceBT_bleGattBlobValue_t bleGattBlobValue_t
 BLE blob value.
 
typedef aceBT_bleGattCharacteristicsValue_t bleGattCharacteristicsValue_t
 BLE GATT Characteristic.
 
typedef aceBT_bleGattDescriptor_t bleGattDescriptor_t
 BLE GATT Descriptor.
 
typedef aceBT_bleGattRecord_t bleGattRecord_t
 BLE GATT Record (ATT attributes)
 
typedef aceBT_bleGattServiceType_t bleGattServiceType_t
 BLE GATT service type.
 
typedef aceBT_commonCallbacks_t commonCallbacks_t
 Callback struct of common Classic/LE Bluetooth operations.
 
typedef aceBT_bleCallbacks_t bleCallbacks_t
 Callback struct of LE Bluetooth operations.
 
typedef aceBT_bleGattClientCallbacks_t bleGattClientCallbacks_t
 Callback struct of GATT Client Bluetooth operations.
 

Variables

bleCallbackVars_t callback_vars
 Internal bleCallbackVars_t.
 
uint32_t gNo_svc
 Internal number of GATT services, often paired with pGgatt_service.
 
bleGattsService_tpGgatt_service
 Internal reference to a GATT service.
 
bleConnHandle ble_conn_handle
 Internal BLE connection handle.
 

Data Structure Documentation

◆ bleCallbackVars_t

struct bleCallbackVars_t

Internal struct for certain Bluetooth conditions.

Most of the Bluetooth operations are asynchronous, even if the API call returns immediately. This is because the API call return just indicates whether the request was made successfully or not. To know whether the Bluetooth hardware completed your request (or failed to), you'll need to sign up for different callbacks.

For some of these operations, kindlebt will set up its own callbacks and wait for the condition, this way we can provide a synchronous behaviour to a few of the API calls.

Definition at line 233 of file kindlebt_defines.h.

Data Fields
bool ble_registered
bool bt_enabled
bool gattc_connected
bool gattc_disconnected
bool gattc_discovered
bool got_gatt_db
bool mtu_set

Variable Documentation

◆ ble_conn_handle

bleConnHandle ble_conn_handle
extern

Internal BLE connection handle.

Definition at line 18 of file kindlebt_callbacks.c.

◆ callback_vars

bleCallbackVars_t callback_vars
extern

Internal bleCallbackVars_t.

Definition at line 17 of file kindlebt_callbacks.c.

◆ gNo_svc

uint32_t gNo_svc
extern

Internal number of GATT services, often paired with pGgatt_service.

Definition at line 20 of file kindlebt_callbacks.c.

◆ pGgatt_service

bleGattsService_t* pGgatt_service
extern

Internal reference to a GATT service.

Definition at line 21 of file kindlebt_callbacks.c.