TI CC254X函数库说明续(BLE GATT.h)

//初始化GATT客户端  
bStatus_t GATT_InitClient(void);  
  
//注册接收ATT的Indications或Notifications属性值  
void GATT_RegisterForInd(uint8 taskId);  
  
//准备写请求用于请求服务器准备写一个属性的值  
bStatus_t GATT_PrepareWriteReq(uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId);  
  
//执行写请求  
bStatus_t GATT_ExecuteWriteReq(uint16 connHandle, attExecuteWriteReq_t *pReq, uint8 taskId);  
  
//初始化GATT服务器  
bStatus_t GATT_InitServer(void);  
  
//为GATT服务器注册服务属性列表  
bStatus_t GATT_RegisterService(gattService_t *pService);  
  
//为GATT服务器注销一个属性列表  
bStatus_t GATT_DeregisterService(uint16 handle, gattService_t *pService);  
  
//注册接收ATT请求  
void GATT_RegisterForReq(uint8 taskId);  
  
//验证属性的读取权限  
bStatus_t GATT_VerifyReadPermissions(uint16 connHandle, uint8 permissions);  
  
//验证属性的写权限  
bStatus_t GATT_VerifyWritePermissions(uint16 connHandle, uint8 permissions, attWriteReq_t *pReq);  
  
//发送服务改变Indication  
uint8 GATT_ServiceChangedInd(uint16 connHandle, uint8 taskId);  
  
//通过UUID找到属性记录  
gattAttribute_t *GATT_FindHandleUUID(uint16 startHandle, uint16 endHandle, const uint8 *pUUID, uint16 len, uint16 *pHandle);  
  
//通过句柄找属性记录  
gattAttribute_t *GATT_FindHandle(uint16 handle, uint16 *pHandle);  
  
//找给定的属性相同类型的下一个属性  
gattAttribute_t *GATT_FindNextAttr(gattAttribute_t *pAttr, uint16 endHandle, uint16 service, uint16 *pLastHandle);  
  
//取得服务的属性数  
uint16 GATT_ServiceNumAttrs(uint16 handle);  
  
//发送Indication  
bStatus_t GATT_Indication(uint16 connHandle, attHandleValueInd_t *pInd, uint8 authenticated, uint8 taskId);  
  
//发送Notification  
bStatus_t GATT_Notification(uint16 connHandle, attHandleValueNoti_t *pNoti, uint8 authenticated);  
  
//客户端设置ATT_MTU最大值  
bStatus_t GATT_ExchangeMTU(uint16 connHandle, attExchangeMTUReq_t *pReq, uint8 taskId);  
  
//客户端用来发现服务器的所有主要服务  
bStatus_t GATT_DiscAllPrimaryServices(uint16 connHandle, uint8 taskId);  
  
//客户端通过UUID发现服务器的特定服务  
bStatus_t GATT_DiscPrimaryServiceByUUID(uint16 connHandle, uint8 *pValue, uint8 len, uint8 taskId);  
  
//This sub-procedure is used by a client to find include service declarations within a service definition on a server. The service specified is identified by the service handle range.  
bStatus_t GATT_FindIncludedServices(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId);  
  
//找到所有特性  
bStatus_t GATT_DiscAllChars(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId);  
  
//通过UUID找到特性  
bStatus_t GATT_DiscCharsByUUID(uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId);  
  
//找到所有特性描述  
bStatus_t GATT_DiscAllCharDescs(uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId);  
  
//读取特性值  
bStatus_t GATT_ReadCharValue(uint16 connHandle, attReadReq_t *pReq, uint8 taskId);  
        bleTimeout: Previous transaction timed out.<BR>  
  
//通过UUID读取特性值  
bStatus_t GATT_ReadUsingCharUUID(uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId);  
  
//读取长特性值  
bStatus_t GATT_ReadLongCharValue(uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId);  
  
//读取多个特性值  
bStatus_t GATT_ReadMultiCharValues(uint16 connHandle, attReadMultiReq_t *pReq, uint8 taskId);  
  
//写特性值,不需要回应  
bStatus_t GATT_WriteNoRsp(uint16 connHandle, attWriteReq_t *pReq);  
  
bStatus_t GATT_SignedWriteNoRsp(uint16 connHandle, attWriteReq_t *pReq);  
  
//写特性值  
bStatus_t GATT_WriteCharValue(uint16 connHandle, attWriteReq_t *pReq, uint8 taskId);  
  
//写长特性值  
bStatus_t GATT_WriteLongCharValue(uint16 connHandle, gattPrepareWriteReq_t *pReq, uint8 taskId);  
  
bStatus_t GATT_ReliableWrites(uint16 connHandle, attPrepareWriteReq_t *pReqs, uint8 numReqs, uint8 flags, uint8 taskId);  
  
//读取特性描述  
bStatus_t GATT_ReadCharDesc(uint16 connHandle, attReadReq_t *pReq, uint8 taskId);  
  
//读取长特性描述  
bStatus_t GATT_ReadLongCharDesc(uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId);  
  
//写特性描述  
bStatus_t GATT_WriteCharDesc(uint16 connHandle, attWriteReq_t *pReq, uint8 taskId);  
  
//写长特性描述  
bStatus_t GATT_WriteLongCharDesc(uint16 connHandle, gattPrepareWriteReq_t *pReq, uint8 taskId);  
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值