[X9D] LCD optimizations
[All] FrSky vario V2 (with cm support)
This commit is contained in:
+12
-11
@@ -13,24 +13,25 @@
|
||||
|
||||
#include "./STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||
|
||||
#define LCD_NCS_HIGH() do{GPIO_SetBits(GPIO_LCD, PIN_LCD_NCS);}while(0)
|
||||
#define LCD_NCS_LOW() do{GPIO_ResetBits(GPIO_LCD, PIN_LCD_NCS);}while(0)
|
||||
#define __no_operation __NOP
|
||||
|
||||
#define LCD_A0_HIGH() do{GPIO_SetBits(GPIO_LCD, PIN_LCD_A0);}while(0)
|
||||
#define LCD_A0_LOW() do{GPIO_ResetBits(GPIO_LCD, PIN_LCD_A0);}while(0)
|
||||
#define LCD_NCS_HIGH() GPIO_LCD->BSRRL = PIN_LCD_NCS
|
||||
#define LCD_NCS_LOW() GPIO_LCD->BSRRH = PIN_LCD_NCS
|
||||
|
||||
#define LCD_RST_HIGH() do{GPIO_SetBits(GPIO_LCD, PIN_LCD_RST);}while(0)
|
||||
#define LCD_RST_LOW() do{GPIO_ResetBits(GPIO_LCD, PIN_LCD_RST);}while(0)
|
||||
#define LCD_A0_HIGH() GPIO_LCD->BSRRL = PIN_LCD_A0
|
||||
#define LCD_A0_LOW() GPIO_LCD->BSRRH = PIN_LCD_A0
|
||||
|
||||
#define LCD_CLK_HIGH() do{GPIO_SetBits(GPIO_LCD, PIN_LCD_CLK);}while(0)
|
||||
#define LCD_CLK_LOW() do{GPIO_ResetBits(GPIO_LCD, PIN_LCD_CLK);}while(0)
|
||||
#define LCD_RST_HIGH() GPIO_LCD->BSRRL = PIN_LCD_RST
|
||||
#define LCD_RST_LOW() GPIO_LCD->BSRRH = PIN_LCD_RST
|
||||
|
||||
#define LCD_MOSI_HIGH() do{GPIO_SetBits(GPIO_LCD, PIN_LCD_MOSI);}while(0)
|
||||
#define LCD_MOSI_LOW() do{GPIO_ResetBits(GPIO_LCD, PIN_LCD_MOSI);}while(0)
|
||||
#define LCD_CLK_HIGH() GPIO_LCD->BSRRL = PIN_LCD_CLK
|
||||
#define LCD_CLK_LOW() GPIO_LCD->BSRRH = PIN_LCD_CLK
|
||||
|
||||
#define LCD_MOSI_HIGH() GPIO_LCD->BSRRL = PIN_LCD_MOSI
|
||||
#define LCD_MOSI_LOW() GPIO_LCD->BSRRH = PIN_LCD_MOSI
|
||||
|
||||
void AspiCmd(u8 Command_Byte);
|
||||
void AspiData(u8 Para_data);
|
||||
//u16 spiRegAccess(u8 addrByte, u8 writeValue);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user