1 |
|
|
|
2 |
|
|
/*************************************************************************** |
3 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
4 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
5 |
|
|
* |
6 |
|
|
* This program and the accompanying materials are made available under the |
7 |
|
|
* terms of the MIT License which is available at |
8 |
|
|
* https://opensource.org/licenses/MIT. |
9 |
|
|
* |
10 |
|
|
* SPDX-License-Identifier: MIT |
11 |
|
|
**************************************************************************/ |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/**************************************************************************/ |
16 |
|
|
/** */ |
17 |
|
|
/** GUIX Component */ |
18 |
|
|
/** */ |
19 |
|
|
/** Display Management (Display) */ |
20 |
|
|
/** */ |
21 |
|
|
/**************************************************************************/ |
22 |
|
|
|
23 |
|
|
#define GX_SOURCE_CODE |
24 |
|
|
/* Include necessary system files. */ |
25 |
|
|
|
26 |
|
|
#include "gx_api.h" |
27 |
|
|
#include "gx_display.h" |
28 |
|
|
|
29 |
|
|
/**************************************************************************/ |
30 |
|
|
/* */ |
31 |
|
|
/* FUNCTION RELEASE */ |
32 |
|
|
/* */ |
33 |
|
|
/* _gx_display_driver_332rgb_setup PORTABLE C */ |
34 |
|
|
/* 6.1 */ |
35 |
|
|
/* AUTHOR */ |
36 |
|
|
/* */ |
37 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
38 |
|
|
/* */ |
39 |
|
|
/* DESCRIPTION */ |
40 |
|
|
/* */ |
41 |
|
|
/* Generic 8-bit 332RGB color format display driver setup routine. */ |
42 |
|
|
/* */ |
43 |
|
|
/* INPUT */ |
44 |
|
|
/* */ |
45 |
|
|
/* display The display control block */ |
46 |
|
|
/* aux_data Driver-defined auxiliary data */ |
47 |
|
|
/* toggle_function Driver-defined screen toggle */ |
48 |
|
|
/* function */ |
49 |
|
|
/* */ |
50 |
|
|
/* OUTPUT */ |
51 |
|
|
/* */ |
52 |
|
|
/* None */ |
53 |
|
|
/* */ |
54 |
|
|
/* CALLS */ |
55 |
|
|
/* */ |
56 |
|
|
/* None */ |
57 |
|
|
/* */ |
58 |
|
|
/* CALLED BY */ |
59 |
|
|
/* */ |
60 |
|
|
/* GUIX Internal Code */ |
61 |
|
|
/* */ |
62 |
|
|
/**************************************************************************/ |
63 |
|
19 |
VOID _gx_display_driver_332rgb_setup(GX_DISPLAY *display, VOID *aux_data, |
64 |
|
|
VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas, |
65 |
|
|
GX_RECTANGLE *dirty_area)) |
66 |
|
|
{ |
67 |
|
19 |
_gx_display_driver_8bit_palette_setup(display, aux_data, toggle_function); |
68 |
|
|
|
69 |
|
19 |
display -> gx_display_color_format = GX_COLOR_FORMAT_8BIT_PACKED_PIXEL; |
70 |
|
19 |
display -> gx_display_driver_native_color_get = _gx_display_driver_332rgb_native_color_get; |
71 |
|
19 |
display -> gx_display_driver_pixelmap_draw = _gx_display_driver_332rgb_pixelmap_draw; |
72 |
|
19 |
display -> gx_display_driver_alphamap_draw = _gx_display_driver_generic_alphamap_draw; |
73 |
|
19 |
display -> gx_display_driver_anti_aliased_line_draw = _gx_display_driver_generic_aliased_line_draw; |
74 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_line_draw = _gx_display_driver_generic_aliased_wide_line_draw; |
75 |
|
|
|
76 |
|
|
#if defined(GX_ARC_DRAWING_SUPPORT) |
77 |
|
19 |
display -> gx_display_driver_anti_aliased_circle_draw = _gx_display_driver_generic_aliased_circle_draw; |
78 |
|
19 |
display -> gx_display_driver_anti_aliased_ellipse_draw = _gx_display_driver_generic_aliased_ellipse_draw; |
79 |
|
19 |
display -> gx_display_driver_anti_aliased_arc_draw = _gx_display_driver_generic_aliased_arc_draw; |
80 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_circle_draw = _gx_display_driver_generic_aliased_wide_circle_draw; |
81 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_ellipse_draw = _gx_display_driver_generic_aliased_wide_ellipse_draw; |
82 |
|
19 |
display -> gx_display_driver_anti_aliased_wide_arc_draw = _gx_display_driver_generic_aliased_wide_arc_draw; |
83 |
|
|
|
84 |
|
|
#endif |
85 |
|
|
|
86 |
|
19 |
display -> gx_display_driver_horizontal_pixelmap_line_draw = _gx_display_driver_332rgb_horizontal_pixelmap_line_draw; |
87 |
|
19 |
display -> gx_display_driver_pixel_blend = _gx_display_driver_332rgb_pixel_blend; |
88 |
|
19 |
display -> gx_display_driver_pixelmap_blend = _gx_display_driver_8bpp_pixelmap_blend; |
89 |
|
19 |
display -> gx_display_driver_pixelmap_rotate = _gx_display_driver_332rgb_pixelmap_rotate; |
90 |
|
19 |
display -> gx_display_driver_4bit_glyph_draw = _gx_display_driver_generic_glyph_4bit_draw; |
91 |
|
19 |
display -> gx_display_driver_8bit_glyph_draw = GX_NULL; |
92 |
|
19 |
display -> gx_display_driver_8bit_compressed_glyph_draw = GX_NULL; |
93 |
|
19 |
display -> gx_display_driver_4bit_compressed_glyph_draw = GX_NULL; |
94 |
|
19 |
display -> gx_display_driver_1bit_compressed_glyph_draw = GX_NULL; |
95 |
|
19 |
} |
96 |
|
|
|