add tlv8_encode_n

This commit is contained in:
hathach committed 2018-01-15 15:13:04 +07:00
1 parent a0dc1eced5
commit 83ad264e35
3 files changed
+14 -5

No files matched your search

@@ -198,11 +198,7 @@ HAPResponse_t* HAPCharacteristic::createHapResponse(uint8_t tid, uint8_t status,
hap_resp->body_len = body_len;
/*------------- Serialize Data -------------*/
uint8_t* pdata = hap_resp->body_data;
for(uint8_t i=0; i < count; i++)
{
if ( !tlv8_encode_next(&pdata, &body_len, tlv_para[i]) ) break;
}
tlv8_encode_n(hap_resp->body_data, body_len, tlv_para, count);
return hap_resp;
}