[X9D] LCD optimizations

[All] FrSky vario V2 (with cm support)
This commit is contained in:
bsongis
2013-01-30 21:51:57 +00:00
parent 6e80e39443
commit 9c5f5c12b6
15 changed files with 75 additions and 75 deletions
+12 -11
View File
@@ -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