Go to the source code of this file.
Classes | |
| struct | rgbc_t |
| An RGBC color. More... | |
| struct | hsl_t |
| An HSL color. More... | |
| struct | rgb_t |
| An RGB-888 color. More... | |
| class | Color_sensor |
| PKS Color Sensor Driver for XRCU. More... | |
Enumerations | |
| enum | color_t { black = 0 , white = 1 , grey = 2 , red = 3 , green = 4 , blue = 5 , yellow = 6 , cyan = 7 , magenta = 8 } |
| Colors returnable by Color_sensor::get_color(). More... | |
Functions | |
| uint16_t | rgb888_to_rgb565 (rgb_t rgb888) |
| Converts an RGB-888 color to an RGB-565 color. | |
Color_sensor.h - PKS Color Sensor Driver for XRCU.
| enum color_t |
Colors returnable by Color_sensor::get_color().
The following is a color code returned by the get_color function of this color sensor only.
Do not mix it with the RGB565 color scheme used by the monitor driver ST7735.
Colors used by monitor look like #define ST7735_RED 0xF800.
| uint16_t rgb888_to_rgb565 | ( | rgb_t | rgb888 | ) |
Converts an RGB-888 color to an RGB-565 color.
| rgb888 | the RGB-888 color to be converted |
Color_sensor.cpp - PKS Color Sensor Driver for XRCU. Copyright (c) 2024 - 2025 YH Choi @ JM9. All right reserved.