mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 13:47:47 +00:00
[posix] clear SPI tx buffer after usage (#9567)
This commit clear "mSpiTxPayloadSize" buffer once packet has been successfully transmitted.
This commit is contained in:
@@ -569,6 +569,8 @@ otError SpiInterface::PushPullSpi(void)
|
||||
mInterfaceMetrics.mTxFrameCount++;
|
||||
mInterfaceMetrics.mTxFrameByteCount += mSpiTxPayloadSize;
|
||||
|
||||
// Clear tx buffer after usage
|
||||
memset(&mSpiTxFrameBuffer[kSpiFrameHeaderSize], 0, mSpiTxPayloadSize);
|
||||
mSpiTxIsReady = false;
|
||||
mSpiTxPayloadSize = 0;
|
||||
mSpiTxRefusedCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user