Skip to content

Commit

Permalink
followup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 5, 2022
1 parent 15dc952 commit ff00528
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void TFT_SPI::Abort() {
LPC_GPDMACH0->DMACCDestAddr = 0U;

DataTransferEnd();
}
}

void TFT_SPI::Transmit(uint16_t Data) { SPIx.transfer(Data); }

Expand All @@ -139,9 +139,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin(DATASIZE_16BIT);
SPIx.dmaSendAsync(Data, Count, MemoryIncrease);

#ifdef TFT_SHARED_SPI
while(isBusy()) {}
#endif
TERN_(TFT_SHARED_SPI, while (isBusy()));
}

#endif // HAS_SPI_TFT
4 changes: 1 addition & 3 deletions Marlin/src/HAL/STM32/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun

SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request

#ifdef TFT_SHARED_SPI
while(isBusy()) {}
#endif
TERN_(TFT_SHARED_SPI, while (isBusy()));
}


Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/STM32F1/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
DataTransferBegin();
SPIx.dmaSendAsync(Data, Count, MemoryIncrease == DMA_MINC_ENABLE);

#ifdef TFT_SHARED_SPI
while(isBusy()) {}
#endif
TERN_(TFT_SHARED_SPI, while (isBusy()));
}

void TFT_SPI::Transmit(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) {
Expand Down

0 comments on commit ff00528

Please sign in to comment.