1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-12 19:10:19 +03:00

SPI3 was hardcoded in the LCD driver

This commit is contained in:
Bertrand Songis 2024-11-20 09:05:06 +01:00
parent 2d56c8cd01
commit dd44e3a69e
No known key found for this signature in database
GPG key ID: F189F79290FEC50F

View file

@ -44,12 +44,12 @@ void lcdWriteCommand(uint8_t byte)
{
LCD_A0_LOW();
LCD_NCS_LOW();
while ((SPI3->SR & SPI_SR_TXE) == 0) {
while ((LCD_SPI->SR & SPI_SR_TXE) == 0) {
// Wait
}
(void)SPI3->DR; // Clear receive
(void)LCD_SPI->DR; // Clear receive
LCD_SPI->DR = byte;
while ((SPI3->SR & SPI_SR_RXNE) == 0) {
while ((LCD_SPI->SR & SPI_SR_RXNE) == 0) {
// Wait
}
LCD_NCS_HIGH();