use max(height,width) to calculate buffer size

This commit is contained in:
trsaunders 2012-06-27 16:45:23 +01:00
parent 1d09786fa4
commit e4ec0e9432
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,8 @@
#ifdef LCD_USE_S6D1121
static uint16_t buf[((SCREEN_HEIGHT > SCREEN_WIDTH ) ? SCREEN_HEIGHT : SCREEN_WIDTH)];
#define LCD_RST_LOW palClearPad(LCD_RST_GPIO, LCD_RST_PIN)
#define LCD_RST_HIGH palSetPad(LCD_RST_GPIO, LCD_RST_PIN)

View File

@ -6,8 +6,7 @@ uint8_t orientation;
uint16_t DeviceCode;
extern uint16_t lcd_width, lcd_height;
/* TODO: use max(height, width) */
static uint16_t buf[SCREEN_HEIGHT];
static uint16_t buf[((SCREEN_HEIGHT > SCREEN_WIDTH ) ? SCREEN_HEIGHT : SCREEN_WIDTH)];
#ifdef LCD_USE_GPIO
static __inline void lld_lcdWriteIndex(uint16_t index) {