关于CC2640主从一体添加UART的问题
时间:10-02
整理:3721RD
点击:
在主从一体例程里添加UART串口,不能进这个“if ( ( pItem->connHandle != INVALID_CONNHANDLE ) && ( pItem->value != GATT_CFG_NO_OPERATION ) ) ”里,主从机能正常链接,串口发来的数据蓝牙发送不出去,怎么回事?
for ( i = 0; i < linkDBNumConns; i++ ) { gattCharCfg_t *pItem = &(charCfgTbl[i]); if ( ( pItem->connHandle != INVALID_CONNHANDLE ) && ( pItem->value != GATT_CFG_NO_OPERATION ) ) { gattAttribute_t *pAttr; // Find the characteristic value attribute 找到特征值的属性 pAttr = GATTServApp_FindAttr( attrTbl, numAttrs, pValue ); if ( pAttr != NULL ) { if ( pItem->value & GATT_CLIENT_CFG_NOTIFY ) { status |= gattServApp_SendNotiInd( pItem->connHandle, GATT_CLIENT_CFG_NOTIFY, authenticated, pAttr, taskId, pfnReadAttrCB ); } if ( pItem->value & GATT_CLIENT_CFG_INDICATE ) { status |= gattServApp_SendNotiInd( pItem->connHandle, GATT_CLIENT_CFG_INDICATE, authenticated, pAttr, taskId, pfnReadAttrCB ); } } } } // for