Skip to content

Commit c724a1f

Browse files
committed
Ensure api is active after pushing
1 parent 6e101e0 commit c724a1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/mbed/common/SPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ int SPI::queue_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, i
125125
return -1; // the buffer is full
126126
} else {
127127
_transaction_buffer.push(transaction);
128+
if (!spi_active(&_spi)) {
129+
dequeue_transaction();
130+
}
128131
return 0;
129132
}
130133
#else

0 commit comments

Comments
 (0)