1 
2 /**************************************************************************/
3 /*                                                                        */
4 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
5 /*                                                                        */
6 /*       This software is licensed under the Microsoft Software License   */
7 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
8 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
9 /*       and in the root directory of this software.                      */
10 /*                                                                        */
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_1555xrgb_setup                   PORTABLE C      */
34 /*                                                           6.1          */
35 /*  AUTHOR                                                                */
36 /*                                                                        */
37 /*    Kenneth Maxwell, Microsoft Corporation                              */
38 /*                                                                        */
39 /*  DESCRIPTION                                                           */
40 /*                                                                        */
41 /*    Generic 16-bit 1555XRGB 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 /*    _gx_display_driver_565rgb_setup       565rgb format display driver  */
53 /*                                            setup routine               */
54 /*                                                                        */
55 /*  CALLS                                                                 */
56 /*                                                                        */
57 /*    None                                                                */
58 /*                                                                        */
59 /*  CALLED BY                                                             */
60 /*                                                                        */
61 /*    GUIX Internal Code                                                  */
62 /*                                                                        */
63 /*  RELEASE HISTORY                                                       */
64 /*                                                                        */
65 /*    DATE              NAME                      DESCRIPTION             */
66 /*                                                                        */
67 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
68 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
69 /*                                            resulting in version 6.1    */
70 /*                                                                        */
71 /**************************************************************************/
_gx_display_driver_1555xrgb_setup(GX_DISPLAY * display,VOID * aux_data,VOID (* toggle_function)(struct GX_CANVAS_STRUCT * canvas,GX_RECTANGLE * dirty_area))72 VOID _gx_display_driver_1555xrgb_setup(GX_DISPLAY *display, VOID *aux_data,
73                                        VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
74                                                                GX_RECTANGLE *dirty_area))
75 {
76     _gx_display_driver_565rgb_setup(display, aux_data, toggle_function);
77 
78     display -> gx_display_color_format = GX_COLOR_FORMAT_1555XRGB;
79     display -> gx_display_driver_native_color_get                = _gx_display_driver_1555xrgb_native_color_get;
80     display -> gx_display_driver_canvas_blend                    = _gx_display_driver_1555xrgb_canvas_blend;
81     display -> gx_display_driver_pixel_blend                     = _gx_display_driver_1555xrgb_pixel_blend;
82     display -> gx_display_driver_pixelmap_rotate                 = _gx_display_driver_1555xrgb_pixelmap_rotate;
83     display -> gx_display_driver_pixelmap_draw                   = _gx_display_driver_1555xrgb_pixelmap_draw;
84     display -> gx_display_driver_pixelmap_blend                  = _gx_display_driver_1555xrgb_pixelmap_blend;
85 
86 #if defined(GX_SOFTWARE_DECODER_SUPPORT)
87     display -> gx_display_driver_jpeg_draw                       = _gx_display_driver_1555xrgb_jpeg_draw;
88     display -> gx_display_driver_png_draw                        = _gx_display_driver_1555xrgb_png_draw;
89 #endif
90 }
91 
92