|
@@ -207,12 +207,12 @@ void TFT_SPI::Transmit(uint16_t Data) {
|
207
|
207
|
while ((SPIx.Instance->SR & SPI_FLAG_BSY) == SPI_FLAG_BSY) {}
|
208
|
208
|
|
209
|
209
|
if (TFT_MISO_PIN != TFT_MOSI_PIN)
|
210
|
|
- __HAL_SPI_CLEAR_OVRFLAG(&SPIx); /* Clear overrun flag in 2 Lines communication mode because received is not read */
|
|
210
|
+ __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received is not read
|
211
|
211
|
}
|
212
|
212
|
|
213
|
213
|
void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
|
214
|
214
|
// Wait last dma finish, to start another
|
215
|
|
- while(isBusy()) { }
|
|
215
|
+ while (isBusy()) { /* nada */ }
|
216
|
216
|
|
217
|
217
|
DMAtx.Init.MemInc = MemoryIncrease;
|
218
|
218
|
HAL_DMA_Init(&DMAtx);
|
|
@@ -225,7 +225,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
|
225
|
225
|
HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(SPIx.Instance->DR), Count);
|
226
|
226
|
__HAL_SPI_ENABLE(&SPIx);
|
227
|
227
|
|
228
|
|
- SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); /* Enable Tx DMA Request */
|
|
228
|
+ SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request
|
229
|
229
|
|
230
|
230
|
HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY);
|
231
|
231
|
Abort();
|