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

[Taranis+] LCD driver now ok

This commit is contained in:
bsongis 2014-05-01 19:00:23 +02:00
parent 3a7f122323
commit aa733fa060

View file

@ -98,12 +98,12 @@ const uint8_t lcdPalette[4] = { 0, 0x03, 0x06, 0x0F };
#define LCD_WRITE_BIT(bit) \
if (bit) \
GPIOD->BSRRL = PIN_LCD_MOSI; \
LCD_MOSI_HIGH(); \
else \
GPIOD->BSRRH = PIN_LCD_MOSI; \
GPIOD->BSRRH = PIN_LCD_CLK; /* Clock low */ \
LCD_MOSI_LOW(); \
LCD_CLK_LOW(); \
__no_operation(); \
GPIOD->BSRRL = PIN_LCD_CLK; /* Clock high */
LCD_CLK_HIGH();
void lcdRefresh()
{
@ -189,7 +189,9 @@ static void LCD_Hardware_Init()
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIO_LCD_SPI, &GPIO_InitStructure);
LCD_NCS_HIGH();
/*!< Configure lcd NCS pin in output pushpull mode ,PULLUP *************/
GPIO_InitStructure.GPIO_Pin = PIN_LCD_NCS;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
@ -200,10 +202,6 @@ static void LCD_Hardware_Init()
/*!< Configure lcd RST pin in output pushpull mode ,PULLUP *************/
GPIO_InitStructure.GPIO_Pin = PIN_LCD_RST;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIO_LCD_RST, &GPIO_InitStructure);
}