static uint16_t CONCAT(_name, _conn_handles_arr)[] = { \
}; \
BUILD_ASSERT(ARRAY_SIZE(CONCAT(_name, _conn_handles_arr)) == (_max_conns)); \
static uint16_t CONCAT(_name, _purge_arr)[] = { \
}; \
BUILD_ASSERT(ARRAY_SIZE(CONCAT(_name, _purge_arr)) == (_max_conns)); \
static sys_slist_t CONCAT(_name, _req_queues)[] = { \
}; \
BUILD_ASSERT(ARRAY_SIZE(CONCAT(_name, _req_queues)) == (_max_conns)); \
K_MEM_SLAB_DEFINE_STATIC(_name##_req_blocks,
sizeof(
struct ble_gq_req), (_max_req_blocks), \
sizeof(void *)); \
static K_HEAP_DEFINE(_name##_heap, (_heap_size)); \
static const struct ble_gq _name = { \
.max_conns = (_max_conns), \
.purge_list = CONCAT(_name, _purge_arr), \
.req_queue = (sys_slist_t *)&CONCAT(_name, _req_queues), \
.req_blocks = &CONCAT(_name, _req_blocks), \
.data_pool = &CONCAT(_name, _heap), \
}; \
void ble_gq_on_ble_evt(const ble_evt_t *ble_evt, void *ble_gq)
Bluetooth LE event handler for the GATT Queue library.
#define BLE_GQ_PURGE_ARRAY_INIT(i, _max_conns)
Helper macro for initializing purge array. Used in BLE_GQ_CUSTOM_DEF.
Definition ble_gq.h:88
#define BLE_GQ_CONN_HANDLE_INIT(i, _)
Helper macro for initializing connection handle array. Used in BLE_GQ_CUSTOM_DEF.
Definition ble_gq.h:83
#define BLE_GQ_REQ_QUEUE_INIT(i, _name)
Helper macro for initializing request queues. Used in BLE_GQ_CUSTOM_DEF.
Definition ble_gq.h:93
Structure to hold a Bluetooth LE GATT request.
Definition ble_gq.h:169
uint16_t *const conn_handles
Pointer to array with registered connection handles.
Definition ble_gq.h:246
Bluetooth LE GATT Queue.
Definition ble_gq.h:238
Macro for defining a Bluetooth LE GATT queue instance.