You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {}
281
+
while (!__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_TXE)) {} // Wait for data transfer to actually start
282
+
while (__HAL_SPI_GET_FLAG(&SPIx, SPI_FLAG_BSY)) {} // Wait until SPI is idle
285
283
#endif
286
284
287
-
__HAL_SPI_DISABLE(&SPIx);
288
-
289
-
#if TFT_MISO_PIN != TFT_MOSI_PIN
290
-
__HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read
291
-
#endif
285
+
if (SPIx.Init.Direction == SPI_DIRECTION_2LINES) __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received data is not read
0 commit comments