![]()
![]()
#define GATT_API_H
![]()
![]()
#include "common/bt_target.h"
![]()
![]()
#include "stack/gattdefs.h"
![]()
![]()
#include "stack/btm_ble_api.h"
![]()
![]()
#define GATT_SUCCESS
![]()
![]()
#define GATT_INVALID_HANDLE
![]()
![]()
#define GATT_READ_NOT_PERMIT
![]()
![]()
#define GATT_WRITE_NOT_PERMIT
![]()
![]()
#define GATT_INVALID_PDU
![]()
![]()
#define GATT_INSUF_AUTHENTICATION
![]()
![]()
#define GATT_REQ_NOT_SUPPORTED
![]()
![]()
#define GATT_INVALID_OFFSET
![]()
![]()
#define GATT_INSUF_AUTHORIZATION
![]()
![]()
#define GATT_PREPARE_Q_FULL
![]()
![]()
#define GATT_NOT_FOUND
![]()
![]()
#define GATT_NOT_LONG
![]()
![]()
#define GATT_INSUF_KEY_SIZE
![]()
![]()
#define GATT_INVALID_ATTR_LEN
![]()
![]()
#define GATT_ERR_UNLIKELY
![]()
![]()
#define GATT_INSUF_ENCRYPTION
![]()
![]()
#define GATT_UNSUPPORT_GRP_TYPE
![]()
![]()
#define GATT_INSUF_RESOURCE
![]()
![]()
#define GATT_DATABASE_OUT_OF_SYNC
![]()
![]()
#define GATT_VALUE_NOT_ALLOWED
![]()
![]()
#define GATT_NO_RESOURCES
![]()
![]()
#define GATT_INTERNAL_ERROR
![]()
![]()
#define GATT_WRONG_STATE
![]()
![]()
#define GATT_DB_FULL
![]()
![]()
#define GATT_BUSY
![]()
![]()
#define GATT_ERROR
![]()
![]()
#define GATT_CMD_STARTED
![]()
![]()
#define GATT_ILLEGAL_PARAMETER
![]()
![]()
#define GATT_PENDING
![]()
![]()
#define GATT_AUTH_FAIL
![]()
![]()
#define GATT_MORE
![]()
![]()
#define GATT_INVALID_CFG
![]()
![]()
#define GATT_SERVICE_STARTED
![]()
![]()
#define GATT_ENCRYPED_MITM
![]()
![]()
#define GATT_ENCRYPED_NO_MITM
![]()
![]()
#define GATT_NOT_ENCRYPTED
![]()
![]()
#define GATT_CONGESTED
![]()
![]()
#define GATT_DUP_REG
![]()
![]()
#define GATT_ALREADY_OPEN
![]()
![]()
#define GATT_CANCEL
![]()
![]()
#define GATT_STACK_RSP
![]()
![]()
#define GATT_APP_RSP
![]()
![]()
#define GATT_UNKNOWN_ERROR
![]()
![]()
#define GATT_CCC_CFG_ERR
![]()
![]()
#define GATT_PRC_IN_PROGRESS
![]()
![]()
#define GATT_OUT_OF_RANGE
![]()
![]()
tGATT_STATUS
![]()
![]()
#define GATT_RSP_ERROR
![]()
![]()
#define GATT_REQ_MTU
![]()
![]()
#define GATT_RSP_MTU
![]()
![]()
#define GATT_REQ_FIND_INFO
![]()
![]()
#define GATT_RSP_FIND_INFO
![]()
![]()
#define GATT_REQ_FIND_TYPE_VALUE
![]()
![]()
#define GATT_RSP_FIND_TYPE_VALUE
![]()
![]()
#define GATT_REQ_READ_BY_TYPE
![]()
![]()
#define GATT_RSP_READ_BY_TYPE
![]()
![]()
#define GATT_REQ_READ
![]()
![]()
#define GATT_RSP_READ
![]()
![]()
#define GATT_REQ_READ_BLOB
![]()
![]()
#define GATT_RSP_READ_BLOB
![]()
![]()
#define GATT_REQ_READ_MULTI
![]()
![]()
#define GATT_RSP_READ_MULTI
![]()
![]()
#define GATT_REQ_READ_BY_GRP_TYPE
![]()
![]()
#define GATT_RSP_READ_BY_GRP_TYPE
![]()
![]()
#define GATT_REQ_WRITE
![]()
![]()
#define GATT_RSP_WRITE
![]()
![]()
#define GATT_CMD_WRITE
![]()
![]()
#define GATT_REQ_PREPARE_WRITE
![]()
![]()
#define GATT_RSP_PREPARE_WRITE
![]()
![]()
#define GATT_REQ_EXEC_WRITE
![]()
![]()
#define GATT_RSP_EXEC_WRITE
![]()
![]()
#define GATT_HANDLE_VALUE_NOTIF
![]()
![]()
#define GATT_HANDLE_VALUE_IND
![]()
![]()
#define GATT_HANDLE_VALUE_CONF
![]()
![]()
#define GATT_REQ_READ_MULTI_VAR
![]()
![]()
#define GATT_RSP_READ_MULTI_VAR
![]()
![]()
#define GATT_HANDLE_MULTI_VALUE_NOTIF
![]()
![]()
#define GATT_SIGN_CMD_WRITE
![]()
![]()
#define GATT_OP_CODE_MAX
![]()
![]()
#define GATT_COMMAND_FLAG
![]()
![]()
#define GATT_HANDLE_IS_VALID
![]()
![]()
#define GATT_CONN_UNKNOWN
![]()
![]()
#define GATT_CONN_L2C_FAILURE
![]()
![]()
#define GATT_CONN_TIMEOUT
![]()
![]()
#define GATT_CONN_TERMINATE_PEER_USER
![]()
![]()
#define GATT_CONN_TERMINATE_LOCAL_HOST
![]()
![]()
#define GATT_CONN_FAIL_ESTABLISH
![]()
![]()
#define GATT_CONN_LMP_TIMEOUT
![]()
![]()
#define GATT_CONN_CANCEL
![]()
![]()
tGATT_DISCONN_REASON
![]()
![]()
#define GATT_MAX_MTU_SIZE
![]()
![]()
#define GATT_MAX_ATTR_LEN
![]()
![]()
#define GATT_DEF_BLE_MTU_SIZE
![]()
![]()
#define GATT_INVALID_CONN_ID
![]()
![]()
#define GATT_CL_MAX_LCB
![]()
![]()
#define GATT_MAX_SCCB
![]()
![]()
#define GATTC_NOTIF_TIMEOUT
![]()
![]()
#define GATT_PERM_READ
![]()
![]()
#define GATT_PERM_READ_ENCRYPTED
![]()
![]()
#define GATT_PERM_READ_ENC_MITM
![]()
![]()
#define GATT_PERM_WRITE
![]()
![]()
#define GATT_PERM_WRITE_ENCRYPTED
![]()
![]()
#define GATT_PERM_WRITE_ENC_MITM
![]()
![]()
#define GATT_PERM_WRITE_SIGNED
![]()
![]()
#define GATT_PERM_WRITE_SIGNED_MITM
![]()
![]()
#define GATT_PERM_READ_AUTHORIZATION
![]()
![]()
#define GATT_PERM_WRITE_AUTHORIZATION
![]()
![]()
tGATT_PERM
![]()
![]()
#define GATT_ENCRYPT_KEY_SIZE_MASK
![]()
![]()
#define GATT_READ_ALLOWED
![]()
![]()
#define GATT_READ_AUTH_REQUIRED
![]()
![]()
#define GATT_READ_MITM_REQUIRED
![]()
![]()
#define GATT_READ_ENCRYPTED_REQUIRED
![]()
![]()
#define GATT_READ_AUTHORIZATION
![]()
![]()
#define GATT_WRITE_AUTH_REQUIRED
![]()
![]()
#define GATT_WRITE_MITM_REQUIRED
![]()
![]()
#define GATT_WRITE_ENCRYPTED_PERM
![]()
![]()
#define GATT_WRITE_SIGNED_PERM
![]()
![]()
#define GATT_WRITE_AUTHORIZATION
![]()
![]()
#define GATT_CHAR_PROP_BIT_BROADCAST
![]()
![]()
#define GATT_CHAR_PROP_BIT_READ
![]()
![]()
#define GATT_CHAR_PROP_BIT_WRITE_NR
![]()
![]()
#define GATT_CHAR_PROP_BIT_WRITE
![]()
![]()
#define GATT_CHAR_PROP_BIT_NOTIFY
![]()
![]()
#define GATT_CHAR_PROP_BIT_INDICATE
![]()
![]()
#define GATT_CHAR_PROP_BIT_AUTH
![]()
![]()
#define GATT_CHAR_PROP_BIT_EXT_PROP
![]()
![]()
tGATT_CHAR_PROP
![]()
![]()
<anonymous enum>
![]()
![]()
GATT_FORMAT_RES
![]()
![]()
GATT_FORMAT_BOOL
![]()
![]()
GATT_FORMAT_2BITS
![]()
![]()
GATT_FORMAT_NIBBLE
![]()
![]()
GATT_FORMAT_UINT8
![]()
![]()
GATT_FORMAT_UINT12
![]()
![]()
GATT_FORMAT_UINT16
![]()
![]()
GATT_FORMAT_UINT24
![]()
![]()
GATT_FORMAT_UINT32
![]()
![]()
GATT_FORMAT_UINT48
![]()
![]()
GATT_FORMAT_UINT64
![]()
![]()
GATT_FORMAT_UINT128
![]()
![]()
GATT_FORMAT_SINT8
![]()
![]()
GATT_FORMAT_SINT12
![]()
![]()
GATT_FORMAT_SINT16
![]()
![]()
GATT_FORMAT_SINT24
![]()
![]()
GATT_FORMAT_SINT32
![]()
![]()
GATT_FORMAT_SINT48
![]()
![]()
GATT_FORMAT_SINT64
![]()
![]()
GATT_FORMAT_SINT128
![]()
![]()
GATT_FORMAT_FLOAT32
![]()
![]()
GATT_FORMAT_FLOAT64
![]()
![]()
GATT_FORMAT_SFLOAT
![]()
![]()
GATT_FORMAT_FLOAT
![]()
![]()
GATT_FORMAT_DUINT16
![]()
![]()
GATT_FORMAT_UTF8S
![]()
![]()
GATT_FORMAT_UTF16S
![]()
![]()
GATT_FORMAT_STRUCT
![]()
![]()
GATT_FORMAT_MAX
![]()
![]()
tGATT_FORMAT
![]()
![]()
tGATT_CHAR_PRES
![]()
![]()
unit
![]()
![]()
descr
![]()
![]()
format
![]()
![]()
exp
![]()
![]()
name_spc
![]()
![]()
tGATT_CHAR_RPT_REF
![]()
![]()
rpt_id
![]()
![]()
rpt_type
![]()
![]()
#define GATT_VALID_RANGE_MAX_SIZE
![]()
![]()
tGATT_VALID_RANGE
![]()
![]()
format
![]()
![]()
len
![]()
![]()
lower_range
![]()
![]()
upper_range
![]()
![]()
#define GATT_AGGR_HANDLE_NUM_MAX
![]()
![]()
tGATT_CHAR_AGGRE
![]()
![]()
num_handle
![]()
![]()
handle_list
![]()
![]()
#define GATT_CHAR_BIT_REL_WRITE
![]()
![]()
#define GATT_CHAR_BIT_WRITE_AUX
![]()
![]()
#define GATT_CLT_CONFIG_NONE
![]()
![]()
#define GATT_CLT_CONFIG_NOTIFICATION
![]()
![]()
#define GATT_CLT_CONFIG_INDICATION
![]()
![]()
tGATT_CLT_CHAR_CONFIG
![]()
![]()
#define GATT_SVR_CONFIG_NONE
![]()
![]()
#define GATT_SVR_CONFIG_BROADCAST
![]()
![]()
tGATT_SVR_CHAR_CONFIG
![]()
![]()
#define GATT_CHAR_BIT_REL_WRITE
![]()
![]()
#define GATT_CHAR_BIT_WRITE_AUX
![]()
![]()
#define GATT_AUTH_REQ_NONE
![]()
![]()
#define GATT_AUTH_REQ_NO_MITM
![]()
![]()
#define GATT_AUTH_REQ_MITM
![]()
![]()
#define GATT_AUTH_REQ_SIGNED_NO_MITM
![]()
![]()
#define GATT_AUTH_REQ_SIGNED_MITM
![]()
![]()
tGATT_AUTH_REQ
![]()
![]()
tGATT_VALUE
![]()
![]()
conn_id
![]()
![]()
handle
![]()
![]()
offset
![]()
![]()
len
![]()
![]()
auth_req
![]()
![]()
value
![]()
![]()
tGATT_ATTR_VAL
![]()
![]()
attr_max_len
![]()
![]()
attr_len
![]()
![]()
attr_val
![]()
![]()
tGATTS_ATTR_CONTROL
![]()
![]()
auto_rsp
![]()
![]()
#define GATT_ATTR_VALUE_ALLOCATED
![]()
![]()
tGATT_ATTR_MASK
![]()
![]()
tGATTS_RSP
![]()
![]()
attr_value
![]()
![]()
handle
![]()
![]()
#define GATT_TRANSPORT_LE
![]()
![]()
#define GATT_TRANSPORT_BR_EDR
![]()
![]()
#define GATT_TRANSPORT_LE_BR_EDR
![]()
![]()
tGATT_TRANSPORT
![]()
![]()
#define GATT_PREP_WRITE_CANCEL
![]()
![]()
#define GATT_PREP_WRITE_EXEC
![]()
![]()
tGATT_EXEC_FLAG
![]()
![]()
tGATT_READ_REQ
![]()
![]()
handle
![]()
![]()
offset
![]()
![]()
is_long
![]()
![]()
need_rsp
![]()
![]()
tGATT_WRITE_REQ
![]()
![]()
handle
![]()
![]()
offset
![]()
![]()
len
![]()
![]()
value
![]()
![]()
need_rsp
![]()
![]()
is_prep
![]()
![]()
tGATTS_DATA
![]()
![]()
read_req
![]()
![]()
write_req
![]()
![]()
handle
![]()
![]()
mtu
![]()
![]()
exec_write
![]()
![]()
tGATT_SERV_IF
![]()
![]()
<anonymous enum>
![]()
![]()
GATTS_REQ_TYPE_READ
![]()
![]()
GATTS_REQ_TYPE_WRITE
![]()
![]()
GATTS_REQ_TYPE_WRITE_EXEC
![]()
![]()
GATTS_REQ_TYPE_MTU
![]()
![]()
GATTS_REQ_TYPE_CONF
![]()
![]()
tGATTS_REQ_TYPE
![]()
![]()
<anonymous enum>
![]()
![]()
GATT_DISC_SRVC_ALL
![]()
![]()
GATT_DISC_SRVC_BY_UUID
![]()
![]()
GATT_DISC_INC_SRVC
![]()
![]()
GATT_DISC_CHAR
![]()
![]()
GATT_DISC_CHAR_BY_UUID
![]()
![]()
GATT_DISC_CHAR_DSCPT
![]()
![]()
GATT_DISC_MAX
![]()
![]()
tGATT_DISC_TYPE
![]()
![]()
tGATT_DISC_PARAM
![]()
![]()
service
![]()
![]()
s_handle
![]()
![]()
e_handle
![]()
![]()
<anonymous enum>
![]()
![]()
GATT_READ_BY_TYPE
![]()
![]()
GATT_READ_BY_HANDLE
![]()
![]()
GATT_READ_MULTIPLE
![]()
![]()
GATT_READ_MULTIPLE_VAR
![]()
![]()
GATT_READ_CHAR_VALUE
![]()
![]()
GATT_READ_PARTIAL
![]()
![]()
GATT_READ_MAX
![]()
![]()
tGATT_READ_TYPE
![]()
![]()
tGATT_READ_BY_TYPE
![]()
![]()
auth_req
![]()
![]()
s_handle
![]()
![]()
e_handle
![]()
![]()
uuid
![]()
![]()
#define GATT_MAX_READ_MULTI_HANDLES
![]()
![]()
tGATT_READ_MULTI
![]()
![]()
auth_req
![]()
![]()
num_handles
![]()
![]()
handles
![]()
![]()
tGATT_READ_BY_HANDLE
![]()
![]()
auth_req
![]()
![]()
handle
![]()
![]()
tGATT_READ_PARTIAL
![]()
![]()
auth_req
![]()
![]()
handle
![]()
![]()
offset
![]()
![]()
tGATT_READ_PARAM
![]()
![]()
service
![]()
![]()
char_type
![]()
![]()
read_multiple
![]()
![]()
by_handle
![]()
![]()
partial
![]()
![]()
<anonymous enum>
![]()
![]()
GATT_WRITE_NO_RSP
![]()
![]()
GATT_WRITE
![]()
![]()
GATT_WRITE_PREPARE
![]()
![]()
tGATT_WRITE_TYPE
![]()
![]()
tGATT_CL_COMPLETE
![]()
![]()
att_value
![]()
![]()
mtu
![]()
![]()
handle
![]()
![]()
#define GATTC_OPTYPE_NONE
![]()
![]()
#define GATTC_OPTYPE_DISCOVERY
![]()
![]()
#define GATTC_OPTYPE_READ
![]()
![]()
#define GATTC_OPTYPE_WRITE
![]()
![]()
#define GATTC_OPTYPE_EXE_WRITE
![]()
![]()
#define GATTC_OPTYPE_CONFIG
![]()
![]()
#define GATTC_OPTYPE_NOTIFICATION
![]()
![]()
#define GATTC_OPTYPE_INDICATION
![]()
![]()
tGATTC_OPTYPE
![]()
![]()
tGATT_CHAR_DCLR_VAL
![]()
![]()
char_prop
![]()
![]()
val_handle
![]()
![]()
char_uuid
![]()
![]()
tGATT_GROUP_VALUE
![]()
![]()
e_handle
![]()
![]()
service_type
![]()
![]()
tGATT_INCL_SRVC
![]()
![]()
service_type
![]()
![]()
s_handle
![]()
![]()
e_handle
![]()
![]()
tGATT_DISC_VALUE
![]()
![]()
incl_service
![]()
![]()
group_value
![]()
![]()
handle
![]()
![]()
dclr_value
![]()
![]()
tGATT_DISC_RES
![]()
![]()
type
![]()
![]()
handle
![]()
![]()
value
![]()
![]()
#define GATT_LINK_NO_IDLE_TIMEOUT
![]()
![]()
#define GATT_INVALID_ACL_HANDLE
![]()
![]()
tGATT_DISC_RES_CB
![]()
![]()
tGATT_DISC_CMPL_CB
![]()
![]()
tGATT_CMPL_CBACK
![]()
![]()
tGATT_CONN_CBACK
![]()
![]()
tGATT_REQ_CBACK
![]()
![]()
tGATT_CONGESTION_CBACK
![]()
![]()
tGATT_ENC_CMPL_CB
![]()
![]()
tGATT_CBACK
![]()
![]()
p_conn_cb
![]()
![]()
p_cmpl_cb
![]()
![]()
p_disc_res_cb
![]()
![]()
p_disc_cmpl_cb
![]()
![]()
p_req_cb
![]()
![]()
p_enc_cmpl_cb
![]()
![]()
p_congestion_cb
![]()
![]()
tGATTS_HNDL_RANGE
![]()
![]()
app_uuid128
![]()
![]()
svc_uuid
![]()
![]()
svc_inst
![]()
![]()
s_handle
![]()
![]()
e_handle
![]()
![]()
is_primary
![]()
![]()
#define GATTS_SRV_CHG_CMD_ADD_CLIENT
![]()
![]()
#define GATTS_SRV_CHG_CMD_UPDATE_CLIENT
![]()
![]()
#define GATTS_SRV_CHG_CMD_REMOVE_CLIENT
![]()
![]()
#define GATTS_SRV_CHG_CMD_READ_NUM_CLENTS
![]()
![]()
#define GATTS_SRV_CHG_CMD_READ_CLENT
![]()
![]()
tGATTS_SRV_CHG_CMD
![]()
![]()
tGATTS_SRV_CHG
![]()
![]()
bda
![]()
![]()
srv_changed
![]()
![]()
tGATTS_SRV_CHG_REQ
![]()
![]()
srv_chg
![]()
![]()
client_read_index
![]()
![]()
tGATTS_SRV_CHG_RSP
![]()
![]()
srv_chg
![]()
![]()
num_clients
![]()
![]()
tGATTS_PENDING_NEW_SRV_START
![]()
![]()
p_new_srv_start
![]()
![]()
tGATTS_NV_SAVE_CBACK
![]()
![]()
tGATTS_NV_SRV_CHG_CBACK
![]()
![]()
tGATT_APPL_INFO
![]()
![]()
p_nv_save_callback
![]()
![]()
p_srv_chg_callback
![]()
![]()
tGATT_HLV
![]()
![]()
handle
![]()
![]()
length
![]()
![]()
value
![]()
![]()
GATT_SetTraceLevel(UINT8);
![]()
![]()
...
![]()
![]()
GATTS_AddHandleRange(tGATTS_HNDL_RANGE *);
![]()
![]()
GATTS_NVRegister(const tGATT_APPL_INFO *);
![]()
![]()
GATTS_CreateService(tGATT_IF, tBT_UUID *, UINT16, UINT16, BOOLEAN);
![]()
![]()
GATTS_AddIncludeService(UINT16, UINT16);
![]()
![]()
GATTS_AddCharacteristic(UINT16, tBT_UUID *, tGATT_PERM, tGATT_CHAR_PROP, tGATT_ATTR_VAL *, tGATTS_ATTR_CONTROL *);
![]()
![]()
GATTS_AddCharDescriptor(UINT16, tGATT_PERM, tBT_UUID *, tGATT_ATTR_VAL *, tGATTS_ATTR_CONTROL *);
![]()
![]()
GATTS_DeleteService(tGATT_IF, tBT_UUID *, UINT16);
![]()
![]()
GATTS_StartService(tGATT_IF, UINT16, tGATT_TRANSPORT);
![]()
![]()
GATTS_StopService(UINT16);
![]()
![]()
GATTS_HandleValueIndication(UINT16, UINT16, UINT16, UINT8 *);
![]()
![]()
GATTS_HandleValueNotification(UINT16, UINT16, UINT16, UINT8 *);
![]()
![]()
GATTS_SendRsp(UINT16, UINT32, tGATT_STATUS, tGATTS_RSP *);
![]()
![]()
GATTS_SetAttributeValue(UINT16, UINT16, UINT8 *);
![]()
![]()
GATTS_GetAttributeValue(UINT16, UINT16 *, UINT8 **);
![]()
![]()
GATTS_GetAttributeValueInternal(UINT16, UINT16 *, UINT8 **);
![]()
![]()
GATTC_ConfigureMTU(UINT16);
![]()
![]()
GATTC_Discover(UINT16, tGATT_DISC_TYPE, tGATT_DISC_PARAM *);
![]()
![]()
GATTC_Read(UINT16, tGATT_READ_TYPE, tGATT_READ_PARAM *);
![]()
![]()
GATTC_Write(UINT16, tGATT_WRITE_TYPE, tGATT_VALUE *);
![]()
![]()
GATTC_ExecuteWrite(UINT16, BOOLEAN);
![]()
![]()
GATTC_SendHandleValueConfirm(UINT16, UINT16);
![]()
![]()
GATTC_AutoDiscoverEnable(UINT8);
![]()
![]()
GATT_SetIdleTimeout(UINT8 *, UINT16, tGATT_TRANSPORT);
![]()
![]()
GATT_Register(tBT_UUID *, const tGATT_CBACK *);
![]()
![]()
GATT_Deregister(tGATT_IF);
![]()
![]()
GATT_StartIf(tGATT_IF);
![]()
![]()
GATT_Connect(tGATT_IF, UINT8 *, tBLE_ADDR_TYPE, BOOLEAN, tBT_TRANSPORT, BOOLEAN);
![]()
![]()
GATT_CancelConnect(tGATT_IF, UINT8 *, BOOLEAN);
![]()
![]()
GATT_Disconnect(UINT16);
![]()
![]()
GATT_SendServiceChangeIndication(UINT8 *);
![]()
![]()
GATT_GetConnectionInfor(UINT16, tGATT_IF *, UINT8 *, tBT_TRANSPORT *);
![]()
![]()
GATT_GetConnIdIfConnected(tGATT_IF, UINT8 *, UINT16 *, tBT_TRANSPORT);
![]()
![]()
GATT_Listen(tGATT_IF, BOOLEAN, BD_ADDR_PTR);
![]()
![]()
GATT_ConfigServiceChangeCCC(UINT8 *, BOOLEAN, tBT_TRANSPORT);
![]()
![]()
GATTS_SetServiceChangeMode(UINT8);
![]()
![]()
GATTS_HandleMultiValueNotification(UINT16, tGATT_HLV *, UINT16);
![]()
![]()
GATTS_ShowLocalDatabase();