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 /**   ST Simulation 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 extern VOID _gx_chromart_simulation_display_driver_565rgb_pixelmap_draw(GX_DRAW_CONTEXT *context,
30                                                                         INT xpos, INT ypos, GX_PIXELMAP *pixelmap);
31 /**************************************************************************/
32 /*                                                                        */
33 /*  FUNCTION                                               RELEASE        */
34 /*                                                                        */
35 /*    _gx_chromart_simulation_display_driver_565rgb_setup PORTABLE C      */
36 /*                                                           6.1.3        */
37 /*  AUTHOR                                                                */
38 /*                                                                        */
39 /*    Kenneth Maxwell, Microsoft Corporation                              */
40 /*                                                                        */
41 /*  DESCRIPTION                                                           */
42 /*                                                                        */
43 /*    This function initiates ST simuation display driver.                */
44 /*                                                                        */
45 /*  INPUT                                                                 */
46 /*                                                                        */
47 /*    display                               The display control block     */
48 /*    aux_data                              Driver-defined auxiliary data */
49 /*    toggle_function                       Driver-defined screen toggle  */
50 /*                                            function                    */
51 /*                                                                        */
52 /*  OUTPUT                                                                */
53 /*                                                                        */
54 /*    None                                                                */
55 /*                                                                        */
56 /*  CALLS                                                                 */
57 /*                                                                        */
58 /*    None                                                                */
59 /*                                                                        */
60 /*  CALLED BY                                                             */
61 /*                                                                        */
62 /*    Application Code                                                    */
63 /*                                                                        */
64 /*  RELEASE HISTORY                                                       */
65 /*                                                                        */
66 /*    DATE              NAME                      DESCRIPTION             */
67 /*                                                                        */
68 /*  12-31-2020     Kenneth Maxwell          Initial Version 6.1.3         */
69 /*                                                                        */
70 /**************************************************************************/
_gx_chromart_simulation_display_driver_565rgb_setup(GX_DISPLAY * display,VOID * aux_data,VOID (* toggle_function)(struct GX_CANVAS_STRUCT * canvas,GX_RECTANGLE * dirty_area))71 VOID _gx_chromart_simulation_display_driver_565rgb_setup(GX_DISPLAY *display, VOID *aux_data,
72                                                          VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
73                                                                                  GX_RECTANGLE *dirty_area))
74 {
75     /* Call generic 565rgb display driver setup. */
76     _gx_display_driver_565rgb_setup(display, aux_data, toggle_function);
77 
78     display -> gx_display_driver_pixelmap_draw                 = _gx_chromart_simulation_display_driver_565rgb_pixelmap_draw;
79 }
80 
81