This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于GATTServApp_ReadCharCfg的问题



static void battNotifyCB( linkDBItem_t *pLinkItem )
{
if ( pLinkItem->stateFlags & LINK_CONNECTED )
{
// uint16 value = GATTServApp_ReadCharCfg( pLinkItem->connectionHandle,
// battLevelClientCharCfg );
// if ( value & GATT_CLIENT_CFG_NOTIFY )
// {
attHandleValueNoti_t noti;

noti.handle = battAttrTbl[BATT_LEVEL_VALUE_IDX].handle;
noti.len = 1;
int16 ax, ay, az, aTemp,gx, gy, gz;
PGetMotion(&ax, &ay, &az, &aTemp, &gx, &gy, &gz);

noti.value[0] =az >> 8;
// noti.value[0] = gz & 0x00ff;
// noti.value[0] = battLevel;

GATT_Notification( pLinkItem->connectionHandle, &noti, FALSE );
// }
}
}我要是不写那两句会有什么后果,// uint16 value = GATTServApp_ReadCharCfg( pLinkItem->connectionHandle,
// battLevelClientCharCfg ); 有什么用?