fixed lld_lcdReadStream()

This commit is contained in:
Tectu 2012-06-27 21:46:16 +02:00
parent 1f43c6d654
commit c621e9f192
2 changed files with 40 additions and 5 deletions

View File

@ -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;
volatile uint16_t dummy;
for(i = 0; i < size; i++) {
buffer[i] = LCD_RAM;
}
#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

24
glcdconf.h Normal file
View File

@ -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