GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_display_driver_1bpp_native_color_get.c Lines: 6 6 100.0 %
Date: 2026-03-06 19:21:09 Branches: 6 6 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
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
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_display.h"
29
30
/**************************************************************************/
31
/*                                                                        */
32
/*  FUNCTION                                               RELEASE        */
33
/*                                                                        */
34
/*    _gx_display_driver_1bpp_native_color_get            PORTABLE C      */
35
/*                                                           6.1          */
36
/*  AUTHOR                                                                */
37
/*                                                                        */
38
/*    Kenneth Maxwell, Microsoft Corporation                              */
39
/*                                                                        */
40
/*  DESCRIPTION                                                           */
41
/*                                                                        */
42
/*    1-bit display driver color conversion routine                       */
43
/*                                                                        */
44
/*  INPUT                                                                 */
45
/*                                                                        */
46
/*    rawcolor                              Raw Color value to be         */
47
/*                                            converted                   */
48
/*                                                                        */
49
/*  OUTPUT                                                                */
50
/*                                                                        */
51
/*    GX_COLOR                              Color value in the screen     */
52
/*                                            color format                */
53
/*                                                                        */
54
/*  CALLS                                                                 */
55
/*                                                                        */
56
/*    None                                                                */
57
/*                                                                        */
58
/*  CALLED BY                                                             */
59
/*                                                                        */
60
/*    GUIX Internal Code                                                  */
61
/*                                                                        */
62
/**************************************************************************/
63
1234
GX_COLOR _gx_display_driver_1bpp_native_color_get(GX_DISPLAY *display, GX_COLOR rawcolor)
64
{
65
    GX_PARAMETER_NOT_USED(display);
66
67
1234
    if ((((rawcolor >> 16) & 0xff) < 0x80) &&
68
597
        (((rawcolor >> 8) & 0xff) < 0x80)  &&
69
596
        ((rawcolor & 0xff) < 0x80))
70
    {
71
595
        return 0x0;
72
    }
73
    else
74
    {
75
639
        return 0x1;
76
    }
77
}
78