Outgoing bind frame

This commit is contained in:
Pawel Spychalski
2018-05-23 15:21:11 +02:00
parent 831c97b219
commit 95ecb7c4f9
5 changed files with 35 additions and 2 deletions

View File

@@ -237,4 +237,13 @@ void encodePingPayload(QspConfiguration_t *qsp, uint32_t currentMicros) {
qsp->payload[3] = (currentMicros >> 24) & 255;
qsp->payloadLength = qspFrameLengths[QSP_FRAME_PING];
}
void encodeBindPayload(QspConfiguration_t *qsp, uint8_t bindKey[]) {
for (uint8_t i = 0; i < qspFrameLengths[QSP_FRAME_PING]; i++) {
qsp->payload[i] = bindKey[i];
}
qsp->payloadLength = qspFrameLengths[QSP_FRAME_PING];
}