Update references to LV_DISPLAY_WIDTH

This commit is contained in:
C47D 2021-01-09 15:04:53 -06:00
parent 6a451cacf7
commit 55c314b685
9 changed files with 24 additions and 25 deletions

View file

@ -28,7 +28,7 @@ extern "C" {
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107
#define DISP_BUF_SIZE (CONFIG_LV_DISPLAY_WIDTH*CONFIG_LV_DISPLAY_HEIGHT)
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * LV_VER_RES_MAX)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486
@ -38,20 +38,20 @@ extern "C" {
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 64)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306
#define DISP_BUF_SIZE (CONFIG_LV_DISPLAY_WIDTH*CONFIG_LV_DISPLAY_HEIGHT)
#define DISP_BUF_SIZE (LV_HOR_RES_MAX*LV_VER_RES_MAX)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X)
#define DISP_BUF_LINES 40
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * DISP_BUF_LINES)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820)
#define DISP_BUF_SIZE (CONFIG_LV_DISPLAY_HEIGHT * IL3820_COLUMNS)
#define DISP_BUF_SIZE (LV_VER_RES_MAX * IL3820_COLUMNS)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01)
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A)
#define DISP_BUF_SIZE ((CONFIG_LV_DISPLAY_HEIGHT * CONFIG_LV_DISPLAY_WIDTH) / 8) // 5KB
#define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 5KB
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D)
#define DISP_BUF_SIZE ((CONFIG_LV_DISPLAY_HEIGHT * CONFIG_LV_DISPLAY_WIDTH) / 8) // 2888 bytes
#define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 2888 bytes
#else
#error "No display controller selected"
#endif

View file

@ -49,7 +49,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#define BIT_CLEAR(a,b) ((a) &= ~(1U<<(b)))
/* Number of pixels? */
#define IL3820_PIXEL (CONFIG_LV_DISPLAY_WIDTH * CONFIG_LV_DISPLAY_HEIGHT)
#define IL3820_PIXEL (LV_HOR_RES_MAX * LV_VER_RES_MAX)
#define EPD_PANEL_NUMOF_COLUMS EPD_PANEL_WIDTH
#define EPD_PANEL_NUMOF_ROWS_PER_PAGE 8

View file

@ -20,8 +20,8 @@ extern "C"
/* Values for Waveshare 2.9inch e-Paper Module, this values shouldn't be
* swapped to change display orientation */
#define EPD_PANEL_WIDTH CONFIG_LV_DISPLAY_WIDTH /* 128 */
#define EPD_PANEL_HEIGHT CONFIG_LV_DISPLAY_HEIGHT /* 296 */
#define EPD_PANEL_WIDTH LV_HOR_RES_MAX /* 128 */
#define EPD_PANEL_HEIGHT LV_VER_RES_MAX /* 296 */
/* 128 = panel width */
#define IL3820_COLUMNS (EPD_PANEL_WIDTH / 8)

View file

@ -43,8 +43,8 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
#define PIN_BUSY CONFIG_LV_DISP_PIN_BUSY
#define PIN_BUSY_BIT ((1ULL << (uint8_t)(CONFIG_LV_DISP_PIN_BUSY)))
#define EVT_BUSY (1UL << 0UL)
#define EPD_WIDTH CONFIG_LV_DISPLAY_WIDTH
#define EPD_HEIGHT CONFIG_LV_DISPLAY_HEIGHT
#define EPD_WIDTH LV_HOR_RES_MAX
#define EPD_HEIGHT LV_VER_RES_MAX
#define EPD_ROW_LEN (EPD_HEIGHT / 8u)
#define EPD_PARTIAL_CNT 5;

View file

@ -124,10 +124,10 @@ void sh1107_set_px_cb(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t b
uint8_t bit_index = 0;
#if defined CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
byte_index = y + (( x>>3 ) * CONFIG_LV_DISPLAY_HEIGHT);
byte_index = y + (( x>>3 ) * LV_VER_RES_MAX);
bit_index = x & 0x7;
#elif defined CONFIG_LV_DISPLAY_ORIENTATION_PORTRAIT
byte_index = x + (( y>>3 ) * CONFIG_LV_DISPLAY_WIDTH);
byte_index = x + (( y>>3 ) * LV_HOR_RES_MAX);
bit_index = y & 0x7;
#endif
@ -159,9 +159,9 @@ void sh1107_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo
sh1107_send_cmd(0xB0 | i); // Set Page Start Address for Page Addressing Mode
size = area->y2 - area->y1 + 1;
#if defined CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
ptr = color_map + i * CONFIG_LV_DISPLAY_HEIGHT;
ptr = color_map + i * LV_VER_RES_MAX;
#else
ptr = color_map + i * CONFIG_LV_DISPLAY_WIDTH;
ptr = color_map + i * LV_HOR_RES_MAX;
#endif
if(i != row2){
sh1107_send_data( (void *) ptr, size);
@ -177,8 +177,8 @@ void sh1107_rounder(struct _disp_drv_t * disp_drv, lv_area_t *area)
// workaround: always send complete size display buffer
area->x1 = 0;
area->y1 = 0;
area->x2 = CONFIG_LV_DISPLAY_WIDTH-1;
area->y2 = CONFIG_LV_DISPLAY_HEIGHT-1;
area->x2 = LV_HOR_RES_MAX-1;
area->y2 = LV_VER_RES_MAX-1;
}
void sh1107_sleep_in()

View file

@ -193,8 +193,8 @@ void ssd1306_rounder(struct _disp_drv_t * disp_drv, lv_area_t *area)
// workaround: always send complete size display buffer
area->x1 = 0;
area->y1 = 0;
area->x2 = CONFIG_LV_DISPLAY_WIDTH-1;
area->y2 = CONFIG_LV_DISPLAY_HEIGHT-1;
area->x2 = LV_HOR_RES_MAX-1;
area->y2 = LV_VER_RES_MAX-1;
}
void ssd1306_sleep_in()

View file

@ -23,7 +23,6 @@ extern "C" {
/*********************
* DEFINES
*********************/
// #define DISP_BUF_SIZE (CONFIG_LV_DISPLAY_WIDTH*CONFIG_LV_DISPLAY_HEIGHT)
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#define ST7735S_DC CONFIG_LV_DISP_PIN_DC

View file

@ -44,8 +44,8 @@
#define PIN_BUSY CONFIG_LV_DISP_PIN_BUSY
#define PIN_BUSY_BIT ((1ULL << (uint8_t)(CONFIG_LV_DISP_PIN_BUSY)))
#define EVT_BUSY (1UL << 0UL)
#define EPD_WIDTH CONFIG_LV_DISPLAY_WIDTH
#define EPD_HEIGHT CONFIG_LV_DISPLAY_HEIGHT
#define EPD_WIDTH LV_HOR_RES_MAX
#define EPD_HEIGHT LV_VER_RES_MAX
#define EPD_ROW_LEN (EPD_HEIGHT / 8u)
#define BIT_SET(a, b) ((a) |= (1U << (b)))

View file

@ -38,16 +38,16 @@ extern "C" {
/*GetMaxX Macro*/
#if CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
#define GetMaxX() (CONFIG_LV_DISPLAY_WIDTH - 1)
#define GetMaxX() (LV_HOR_RES_MAX - 1)
#else
#define GetMaxX() (CONFIG_LV_DISPLAY_HEIGHT - 1)
#define GetMaxX() (LV_VER_RES_MAX - 1)
#endif
/*GetMaxY Macro*/
#if CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE
#define GetMaxY() (CONFIG_LV_DISPLAY_HEIGHT - 1)
#define GetMaxY() (LV_VER_RES_MAX - 1)
#else
#define GetMaxY() (CONFIG_LV_DISPLAY_WIDTH - 1)
#define GetMaxY() (LV_HOR_RES_MAX - 1)
#endif
#ifndef CONCAT3