aboutsummaryrefslogtreecommitdiff
path: root/tests/unity/unity_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unity/unity_support.c')
-rw-r--r--tests/unity/unity_support.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/unity/unity_support.c b/tests/unity/unity_support.c
index c045d6ddf..a2a563977 100644
--- a/tests/unity/unity_support.c
+++ b/tests/unity/unity_support.c
@@ -1,4 +1,4 @@
-/**
+/**
* @file lv_test_assert.c
*
* Copyright 2002-2010 Guillaume Cottenceau.
@@ -423,6 +423,36 @@ static void buf_to_xrgb8888(const uint8_t * buf_in, uint8_t * buf_out, lv_color_
buf_out += 800 * 4;
}
}
+ else if(cf_in == LV_COLOR_FORMAT_L8) {
+ uint32_t y;
+ for(y = 0; y < 480; y++) {
+ uint32_t x;
+ for(x = 0; x < 800; x++) {
+ buf_out[x * 4 + 3] = 0xff;
+ buf_out[x * 4 + 2] = buf_in[x];
+ buf_out[x * 4 + 1] = buf_in[x];
+ buf_out[x * 4 + 0] = buf_in[x];
+ }
+
+ buf_in += stride;
+ buf_out += 800 * 4;
+ }
+ }
+ else if (cf_in == LV_COLOR_FORMAT_AL88) {
+ uint32_t y;
+ for (y = 0; y < 480; y++) {
+ uint32_t x;
+ for (x = 0; x < 800; x++) {
+ buf_out[x * 4 + 3] = buf_in[x * 2 + 1];
+ buf_out[x * 4 + 2] = buf_in[x * 2 + 0];
+ buf_out[x * 4 + 1] = buf_in[x * 2 + 0];
+ buf_out[x * 4 + 0] = buf_in[x * 2 + 0];
+ }
+
+ buf_in += stride;
+ buf_out += 800 * 4;
+ }
+ }
}
static void create_folders_if_needed(const char * path)