From 69d7d5376889d5d3bbc100f74b86118e06695f19 Mon Sep 17 00:00:00 2001 From: Paul Peavyhouse Date: Tue, 22 Oct 2019 13:07:01 -0700 Subject: [PATCH] Documenting code --- src/lv_misc/lv_color.c | 15 ++++++++++----- src/lv_misc/lv_color.h | 17 +++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/lv_misc/lv_color.c b/src/lv_misc/lv_color.c index 3a9c0f8a6..547dcc298 100644 --- a/src/lv_misc/lv_color.c +++ b/src/lv_misc/lv_color.c @@ -105,11 +105,11 @@ lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) } /** - * Convert an 32-bit RGB color to HSV - * @param r red - * @param g green - * @param b blue - * @return the given RGB color n HSV + * Convert a 32-bit RGB color to HSV + * @param r8 8-bit red + * @param g8 8-bit green + * @param b8 8-bit blue + * @return the given RGB color in HSV */ lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) { @@ -152,6 +152,11 @@ lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) return hsv; } +/** + * Convert a color to HSV + * @param color color + * @return the given color in HSV + */ lv_color_hsv_t lv_color_to_hsv(lv_color_t color) { lv_color32_t color32; diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index 35c2301f1..7e7ad1def 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -463,14 +463,19 @@ static inline lv_color_t lv_color_hex3(uint32_t c) lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v); /** - * Convert an RGB color to HSV - * @param r red - * @param g green - * @param b blue - * @return the given RGB color n HSV + * Convert a 32-bit RGB color to HSV + * @param r8 8-bit red + * @param g8 8-bit green + * @param b8 8-bit blue + * @return the given RGB color in HSV */ -lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r, uint8_t g, uint8_t b); +lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8); +/** + * Convert a color to HSV + * @param color color + * @return the given color in HSV + */ lv_color_hsv_t lv_color_to_hsv(lv_color_t color); /**********************