mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Add rgb565cmp() color helper
This commit is contained in:
@@ -86,3 +86,7 @@ void rgb2hsv(const RgbColor* rgb, HsvColor* hsv) {
|
||||
hsv->h = 171 + 43 * (rgb->r - rgb->g) / (rgbMax - rgbMin);
|
||||
}
|
||||
}
|
||||
|
||||
inline int rgb565cmp(const Rgb565Color* a, const Rgb565Color* b) {
|
||||
return memcmp(a, b, sizeof(Rgb565Color));
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ typedef union {
|
||||
};
|
||||
} Rgb565Color;
|
||||
|
||||
int rgb565cmp(const Rgb565Color* a, const Rgb565Color* b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2958,6 +2958,7 @@ Function,-,rename,int,"const char*, const char*"
|
||||
Function,-,renameat,int,"int, const char*, int, const char*"
|
||||
Function,-,rewind,void,FILE*
|
||||
Function,+,rgb2hsv,void,"const RgbColor*, HsvColor*"
|
||||
Function,+,rgb565cmp,int,"const Rgb565Color*, const Rgb565Color*"
|
||||
Function,+,rgb_backlight_get_color,void,"uint8_t, RgbColor*"
|
||||
Function,+,rgb_backlight_get_rainbow_interval,uint32_t,
|
||||
Function,+,rgb_backlight_get_rainbow_mode,RGBBacklightRainbowMode,
|
||||
|
||||
|
Reference in New Issue
Block a user