diff options
author | Tectu <joel@unormal.org> | 2012-05-23 16:10:03 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-05-23 16:10:03 +0200 |
commit | 94322d769e59487313b7286ba5e13e52cce57467 (patch) | |
tree | 4a0f83664d29715efadbe02ed25ca685edc4afd1 | |
parent | 0eea8db0f3c470766e7120ab7dc7250d4e148021 (diff) | |
download | uGFX-94322d769e59487313b7286ba5e13e52cce57467.tar.gz uGFX-94322d769e59487313b7286ba5e13e52cce57467.tar.bz2 uGFX-94322d769e59487313b7286ba5e13e52cce57467.zip |
fixes
-rwxr-xr-x | glcd.c | 16 | ||||
-rwxr-xr-x | glcd.h | 16 |
2 files changed, 16 insertions, 16 deletions
@@ -8,7 +8,7 @@ static __inline void lcdWriteIndex(uint16_t index) { Clr_Rs;
Set_nRd;
- palWritePort(LCD_PORT, index);
+ LCD_DATA_PORT->ODR = index;
Clr_nWr;
Set_nWr;
@@ -17,7 +17,7 @@ static __inline void lcdWriteIndex(uint16_t index) { static __inline void lcdWriteData(uint16_t data) {
Set_Rs;
- palWritePort(LCD_PORT, data);
+ LCD_DATA_PORT->ODR = data;
Clr_nWr;
Set_nWr;
@@ -31,15 +31,15 @@ static __inline uint16_t lcdReadData(void) { Clr_nRd;
// change pin mode to digital input
- LCD_PORT->CRH = 0x44444444;
- LCD_PORT->CRL = 0x44444444;
+ LCD_DATA_PORT->CRH = 0x44444444;
+ LCD_DATA_PORT->CRL = 0x44444444;
- value = LCD_PORT->IDR;
- value = LCD_PORT->IDR;
+ value = LCD_DATA_PORT->IDR;
+ value = LCD_DATA_PORT->IDR;
// change pin mode back to digital output
- LCD_PORT->CRH = 0x33333333;
- LCD_PORT->CRL = 0x33333333;
+ LCD_DATA_PORT->CRH = 0x33333333;
+ LCD_DATA_PORT->CRL = 0x33333333;
Set_nRd;
@@ -7,14 +7,14 @@ #define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
-#define Set_Cs LCD_PORT->ODR |= ( 1<<12 );
-#define Clr_Cs LCD_PORT->ODR &= ~( 1<<12 );
-#define Set_Rs LCD_PORT->ODR |= ( 1<<13 );
-#define Clr_Rs LCD_PORT->ODR &= ~( 1<<13 );
-#define Set_nWr LCD_PORT->ODR |= ( 1<<14 );
-#define Clr_nWr LCD_PORT->ODR &= ~( 1<<14 );
-#define Set_nRd LCD_PORT->ODR |= ( 1<<15 );
-#define Clr_nRd LCD_PORT->ODR &= ~( 1<<15 );
+#define Set_Cs LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_CS);
+#define Clr_Cs LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_CS);
+#define Set_Rs LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_RS);
+#define Clr_Rs LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_RS);
+#define Set_nWr LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_WR);
+#define Clr_nWr LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_WR);
+#define Set_nRd LCD_CMD_PORT->ODR |= (1 << GPIOD_LCD_RD);
+#define Clr_nRd LCD_CMD_PORT->ODR &= ~(1 << GPIOD_LCD_RD);
/* LCD color */
#define White 0xFFFF
|