diff options
author | Tectu <joel@unormal.org> | 2012-06-27 21:46:16 +0200 |
---|---|---|
committer | Tectu <joel@unormal.org> | 2012-06-27 21:46:16 +0200 |
commit | c621e9f19281a568e351e1c0a9b8fd17d3b0202c (patch) | |
tree | 5c531e2659859f4e6fb83e9243668b89bafb3d00 | |
parent | 1f43c6d654b9cbb86138c40e1f7f133d0bb5d214 (diff) | |
download | uGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.tar.gz uGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.tar.bz2 uGFX-c621e9f19281a568e351e1c0a9b8fd17d3b0202c.zip |
fixed lld_lcdReadStream()
-rw-r--r-- | drivers/lcd/ssd1289_lld.c | 23 | ||||
-rw-r--r-- | glcdconf.h | 24 |
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 + |