Hardware SPI used for the Taranis+ LCD. Thanks Mike!

This commit is contained in:
bsongis
2014-07-05 19:03:11 +02:00
parent 8200164797
commit 9337080307
7 changed files with 183 additions and 80 deletions
+18 -1
View File
@@ -31,7 +31,23 @@
return readValue;
}*/
//Anolog spi
#if defined(REVPLUS)
void AspiCmd(uint8_t Command_Byte)
{
LCD_A0_LOW() ;
LCD_NCS_LOW() ;
while ( ( SPI3->SR & SPI_SR_TXE ) == 0 ) {
// wait
}
(void)SPI3->DR ; // Clear receive
SPI3->DR = Command_Byte ;
while ( ( SPI3->SR & SPI_SR_RXNE ) == 0 ) {
// wait
}
LCD_NCS_HIGH() ;
}
#else
// Analog SPI
void AspiCmd(u8 Command_Byte)
{
int i=8;
@@ -58,6 +74,7 @@ void AspiCmd(u8 Command_Byte)
LCD_NCS_HIGH();
LCD_A0_HIGH();
}
#endif
/**