Skip to content

Commit 8856fdc

Browse files
VynDragonfabiobaltieri
authored andcommitted
tests: Introduce greyscale-related tests modifications
This introduces greyscale-related changes to tests Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent 60914ac commit 8856fdc

File tree

2 files changed

+4
-2
lines changed
  • tests
    • drivers/display/display_read_write/src
    • lib/gui/lvgl/src

2 files changed

+4
-2
lines changed

tests/drivers/display/display_read_write/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static inline uint8_t bytes_per_pixel(enum display_pixel_format pixel_format)
3434
case PIXEL_FORMAT_RGB_565:
3535
case PIXEL_FORMAT_BGR_565:
3636
return 2;
37+
case PIXEL_FORMAT_L_8:
3738
case PIXEL_FORMAT_MONO01:
3839
case PIXEL_FORMAT_MONO10:
3940
default:

tests/lib/gui/lvgl/src/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ void *setup_lvgl(void)
104104

105105
#if CONFIG_LV_COLOR_DEPTH_1 == 1
106106
display_set_pixel_format(display_dev, PIXEL_FORMAT_MONO10);
107-
#elif CONFIG_LV_COLOR_DEPTH_8 == 1 || CONFIG_LV_COLOR_DEPTH_24 == 1
108-
/* No 8bit display pixel format not supported */
107+
#elif CONFIG_LV_COLOR_DEPTH_8 == 1
108+
display_set_pixel_format(display_dev, PIXEL_FORMAT_L_8);
109+
#elif CONFIG_LV_COLOR_DEPTH_24 == 1
109110
display_set_pixel_format(display_dev, PIXEL_FORMAT_RGB_888);
110111
#elif CONFIG_LV_COLOR_DEPTH_16 == 1
111112
display_set_pixel_format(display_dev, PIXEL_FORMAT_RGB_565);

0 commit comments

Comments
 (0)