1 
2 /***************************************************************************
3  * Copyright (c) 2024 Microsoft Corporation
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the MIT License which is available at
7  * https://opensource.org/licenses/MIT.
8  *
9  * SPDX-License-Identifier: MIT
10  **************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** GUIX Component                                                        */
17 /**                                                                       */
18 /**   Display Management (Display)                                        */
19 /**                                                                       */
20 /**************************************************************************/
21 
22 #define GX_SOURCE_CODE
23 /* Include necessary system files.  */
24 
25 #include "gx_api.h"
26 #include "gx_display.h"
27 
28 /**************************************************************************/
29 /*                                                                        */
30 /*  FUNCTION                                               RELEASE        */
31 /*                                                                        */
32 /*    _gx_display_driver_1555xrgb_setup                   PORTABLE C      */
33 /*                                                           6.1          */
34 /*  AUTHOR                                                                */
35 /*                                                                        */
36 /*    Kenneth Maxwell, Microsoft Corporation                              */
37 /*                                                                        */
38 /*  DESCRIPTION                                                           */
39 /*                                                                        */
40 /*    Generic 16-bit 1555XRGB color format display driver setup routine.  */
41 /*                                                                        */
42 /*  INPUT                                                                 */
43 /*                                                                        */
44 /*    display                               The display control block     */
45 /*    aux_data                              Driver-defined auxiliary data */
46 /*    toggle_function                       Driver-defined screen toggle  */
47 /*                                            function                    */
48 /*                                                                        */
49 /*  OUTPUT                                                                */
50 /*                                                                        */
51 /*    _gx_display_driver_565rgb_setup       565rgb format display driver  */
52 /*                                            setup routine               */
53 /*                                                                        */
54 /*  CALLS                                                                 */
55 /*                                                                        */
56 /*    None                                                                */
57 /*                                                                        */
58 /*  CALLED BY                                                             */
59 /*                                                                        */
60 /*    GUIX Internal Code                                                  */
61 /*                                                                        */
62 /*  RELEASE HISTORY                                                       */
63 /*                                                                        */
64 /*    DATE              NAME                      DESCRIPTION             */
65 /*                                                                        */
66 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
67 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
68 /*                                            resulting in version 6.1    */
69 /*                                                                        */
70 /**************************************************************************/
_gx_display_driver_1555xrgb_setup(GX_DISPLAY * display,VOID * aux_data,VOID (* toggle_function)(struct GX_CANVAS_STRUCT * canvas,GX_RECTANGLE * dirty_area))71 VOID _gx_display_driver_1555xrgb_setup(GX_DISPLAY *display, VOID *aux_data,
72                                        VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
73                                                                GX_RECTANGLE *dirty_area))
74 {
75     _gx_display_driver_565rgb_setup(display, aux_data, toggle_function);
76 
77     display -> gx_display_color_format = GX_COLOR_FORMAT_1555XRGB;
78     display -> gx_display_driver_native_color_get                = _gx_display_driver_1555xrgb_native_color_get;
79     display -> gx_display_driver_canvas_blend                    = _gx_display_driver_1555xrgb_canvas_blend;
80     display -> gx_display_driver_pixel_blend                     = _gx_display_driver_1555xrgb_pixel_blend;
81     display -> gx_display_driver_pixelmap_rotate                 = _gx_display_driver_1555xrgb_pixelmap_rotate;
82     display -> gx_display_driver_pixelmap_draw                   = _gx_display_driver_1555xrgb_pixelmap_draw;
83     display -> gx_display_driver_pixelmap_blend                  = _gx_display_driver_1555xrgb_pixelmap_blend;
84 
85 #if defined(GX_SOFTWARE_DECODER_SUPPORT)
86     display -> gx_display_driver_jpeg_draw                       = _gx_display_driver_1555xrgb_jpeg_draw;
87     display -> gx_display_driver_png_draw                        = _gx_display_driver_1555xrgb_png_draw;
88 #endif
89 }
90 
91