aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-27 21:46:16 +0200
committerTectu <joel@unormal.org>2012-06-27 21:46:16 +0200
commitc621e9f19281a568e351e1c0a9b8fd17d3b0202c (patch)
tree5c531e2659859f4e6fb83e9243668b89bafb3d00
parent1f43c6d654b9cbb86138c40e1f7f133d0bb5d214 (diff)
downloaduGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.tar.gz
uGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.tar.bz2
uGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.zip
fixed lld_lcdReadStream()
-rw-r--r--drivers/lcd/ssd1289_lld.c23
-rw-r--r--glcdconf.h24
2 files changed, 41 insertions, 6 deletions
diff --git a/drivers/lcd/ssd1289_lld.c b/drivers/lcd/ssd1289_lld.c
index 5a14d238..3fc48921 100644
--- a/drivers/lcd/ssd1289_lld.c
+++ b/drivers/lcd/ssd1289_lld.c
@@ -97,12 +97,23 @@ __inline void lld_lcdReadStreamStop(void) {
__inline void lld_lcdReadStream(uint16_t *buffer, size_t size) {
uint16_t i;
- /* throw away first value read */
- volatile uint16_t dummy = LCD_RAM;
-
- for(i = 0; i < size; i++) {
- buffer[i] = LCD_RAM;
- }
+ volatile uint16_t dummy;
+
+ #ifdef LCD_USE_GPIO
+ dummy = lld_lcdReadGPIO();
+ for(i = 0; i < size; i++)
+ buffer[i] = lld_lcdReadGPIO();
+ #endif
+
+ #ifdef LCD_USE_SPI
+ /* ToDo */
+ #endif
+
+ #ifdef LCD_USE_FSMC
+ dummy = LCD_RAM;
+ for(i = 0; i < size; i++)
+ buffer[i] = LCD_RAM;
+ #endif
}
#endif
diff --git a/glcdconf.h b/glcdconf.h
new file mode 100644
index 00000000..d7a9f583
--- /dev/null
+++ b/glcdconf.h
@@ -0,0 +1,24 @@
+#ifndef GLCDCONF_H
+#define GLCDCONF_H
+
+#define SCREEN_WIDTH 240
+#define SCREEN_HEIGHT 320
+
+/***** LCD CONTROLLER *****/
+#define LCD_USE_SSD1289
+// #define LCD_USE_S6D1121
+
+
+/***** LCD INTERFACE *****/
+#define LCD_USE_GPIO
+// #define LCD_USE_SPI
+// #define LCD_USE_FSMC
+
+
+/***** TOUCHPAD CONTROLLER *****/
+// #define TOUCHPAD_USE_ADS7843
+#define TOUCHPAD_USE_XPT2046
+
+
+#endif
+