1 /* 2 * Copyright (c) 2024 TOKITA Hiroshi 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef TESTS_SUBSYS_DISPLAY_CFB_DRAW_TEXT_AND_PRINT_SRC_UTILS_H__ 8 #define TESTS_SUBSYS_DISPLAY_CFB_DRAW_TEXT_AND_PRINT_SRC_UTILS_H__ 9 10 #include <stdbool.h> 11 #include <stdint.h> 12 #include <zephyr/devicetree.h> 13 14 extern uint8_t read_buffer[DT_PROP(DT_CHOSEN(zephyr_display), width) * 15 DT_PROP(DT_CHOSEN(zephyr_display), height) * 4]; 16 17 uint32_t display_pixel(int x, int y); 18 uint32_t image_pixel(const uint32_t *img, size_t width, int x, int y); 19 bool verify_pixel(int x, int y, uint32_t color); 20 bool verify_image(int x, int y, const uint32_t *img, size_t width, size_t height); 21 bool verify_color_inside_rect(int x, int y, size_t width, size_t height, uint32_t color); 22 bool verify_color_outside_rect(int x, int y, size_t width, size_t height, uint32_t color); 23 bool verify_image_and_bg(int x, int y, const uint32_t *img, size_t width, size_t height, 24 uint32_t color); 25 bool verify_pixel_and_bg(int x, int y, uint32_t pixcolor, uint32_t bgcolor); 26 27 #endif /* TESTS_SUBSYS_DISPLAY_CFB_DRAW_TEXT_AND_PRINT_SRC_UTILS_H__ */ 28