STM32F1: Sync SPI changes from maple master (#15266)
This commit is contained in:
committed by
Scott Lahteine
parent
20fbb751f1
commit
02d400e413
@@ -406,4 +406,12 @@ private:
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset.
|
||||
*/
|
||||
static inline void waitSpiTxEnd(spi_dev *spi_d) {
|
||||
while (spi_is_tx_empty(spi_d) == 0) { /* nada */ } // wait until TXE=1
|
||||
while (spi_is_busy(spi_d) != 0) { /* nada */ } // wait until BSY=0
|
||||
}
|
||||
|
||||
extern SPIClass SPI;
|
||||
|
||||
Reference in New Issue
Block a user