Skip to content

Commit bf8c0ae

Browse files
ngphibangfabiobaltieri
authored andcommitted
include: display: Add more documentation for RGB565 and BGR565 formats
Add more detailed documentation for RGB565 and BGR565 formats. Signed-off-by: Phi Bang Nguyen <[email protected]>
1 parent a294653 commit bf8c0ae

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

include/zephyr/drivers/display.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,28 @@ enum display_pixel_format {
4444
PIXEL_FORMAT_MONO01 = BIT(1), /**< Monochrome (0=Black 1=White) */
4545
PIXEL_FORMAT_MONO10 = BIT(2), /**< Monochrome (1=Black 0=White) */
4646
PIXEL_FORMAT_ARGB_8888 = BIT(3), /**< 32-bit ARGB */
47-
PIXEL_FORMAT_RGB_565 = BIT(4), /**< 16-bit RGB */
48-
PIXEL_FORMAT_BGR_565 = BIT(5), /**< 16-bit BGR */
47+
/**
48+
* 16-bit RGB format packed into two bytes: 5 red bits [15:11], 6
49+
* green bits [10:5], 5 blue bits [4:0]. For example, in little-endian machine:
50+
*
51+
* @code{.unparsed}
52+
* 7......0 15.....8
53+
* | gggBbbbb RrrrrGgg | ...
54+
* @endcode
55+
*
56+
*/
57+
PIXEL_FORMAT_RGB_565 = BIT(4),
58+
/**
59+
* 16-bit RGB format packed into two bytes: 5 blue bits [15:11], 6
60+
* green bits [10:5], 5 red bits [4:0]. For example, in little-endian machine:
61+
*
62+
* @code{.unparsed}
63+
* 7......0 15.....8
64+
* | gggRrrrr BbbbbGgg | ...
65+
* @endcode
66+
*
67+
*/
68+
PIXEL_FORMAT_BGR_565 = BIT(5),
4969
PIXEL_FORMAT_L_8 = BIT(6), /**< 8-bit Grayscale/Luminance, equivalent to */
5070
/**< GRAY, GREY, GRAY8, Y8, R8, etc... */
5171
};

0 commit comments

Comments
 (0)