diff options
author | Victor Wheeler <vwheeler63@users.noreply.github.com> | 2024-08-12 06:20:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 14:20:15 +0200 |
commit | 14461f1d9dcd168d59d07ea682ca671e55b1c0eb (patch) | |
tree | 2b9d2234bdd090deb4b1c967e19b23e1e8d068a2 | |
parent | 8699a7e86e18fdb09bb2d72e35c75bdedc539b14 (diff) | |
download | lvgl-14461f1d9dcd168d59d07ea682ca671e55b1c0eb.tar.gz lvgl-14461f1d9dcd168d59d07ea682ca671e55b1c0eb.zip |
fix(docbuild): Doxygen warnings from format errors (part 1 of 2) (#6652)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
40 files changed, 253 insertions, 241 deletions
diff --git a/src/core/lv_group.h b/src/core/lv_group.h index 77d97c64e..ac7d6501d 100644 --- a/src/core/lv_group.h +++ b/src/core/lv_group.h @@ -21,7 +21,7 @@ extern "C" { /********************* * DEFINES *********************/ -/*Predefined keys to control the focused object via lv_group_send(group, c)*/ +/** Predefined keys to control focused object via lv_group_send(group, c) */ typedef enum { LV_KEY_UP = 17, /*0x11*/ LV_KEY_DOWN = 18, /*0x12*/ diff --git a/src/core/lv_obj_class_private.h b/src/core/lv_obj_class_private.h index 464813fb6..1279b9caf 100644 --- a/src/core/lv_obj_class_private.h +++ b/src/core/lv_obj_class_private.h @@ -30,11 +30,11 @@ extern "C" { */ struct lv_obj_class_t { const lv_obj_class_t * base_class; - /*class_p is the final class while obj->class_p is the class currently being [de]constructed.*/ + /** class_p is the final class while obj->class_p is the class currently being [de]constructed. */ void (*constructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); void (*destructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); - /*class_p is the class in which event is being processed.*/ + /** class_p is the class in which event is being processed. */ void (*event_cb)(const lv_obj_class_t * class_p, lv_event_t * e); /**< Widget type specific event function*/ #if LV_USE_OBJ_PROPERTY diff --git a/src/core/lv_obj_private.h b/src/core/lv_obj_private.h index 931454e78..d9eee4939 100644 --- a/src/core/lv_obj_private.h +++ b/src/core/lv_obj_private.h @@ -29,7 +29,7 @@ extern "C" { * They are allocated automatically if any elements is set. */ struct lv_obj_spec_attr_t { - lv_obj_t ** children; /**< Store the pointer of the children in an array.*/ + lv_obj_t ** children; /**< Store the pointer of the children in an array.*/ lv_group_t * group_p; lv_event_list_t event_list; @@ -43,7 +43,7 @@ struct lv_obj_spec_attr_t { uint16_t scroll_snap_x : 2; /**< Where to align the snappable children horizontally, see `lv_scroll_snap_t`*/ uint16_t scroll_snap_y : 2; /**< Where to align the snappable children vertically*/ uint16_t scroll_dir : 4; /**< The allowed scroll direction(s), see `lv_dir_t`*/ - uint16_t layer_type : 2; /**< Cache the layer type here. Element of @lv_intermediate_layer_type_t */ + uint16_t layer_type : 2; /**< Cache the layer type here. Element of lv_intermediate_layer_type_t */ }; struct lv_obj_t { diff --git a/src/core/lv_obj_style.h b/src/core/lv_obj_style.h index face6f9d2..ff4e365d8 100644 --- a/src/core/lv_obj_style.h +++ b/src/core/lv_obj_style.h @@ -26,10 +26,10 @@ extern "C" { **********************/ typedef enum { - LV_STYLE_STATE_CMP_SAME, /*The style properties in the 2 states are identical*/ - LV_STYLE_STATE_CMP_DIFF_REDRAW, /*The differences can be shown with a simple redraw*/ - LV_STYLE_STATE_CMP_DIFF_DRAW_PAD, /*The differences can be shown with a simple redraw*/ - LV_STYLE_STATE_CMP_DIFF_LAYOUT, /*The differences can be shown with a simple redraw*/ + LV_STYLE_STATE_CMP_SAME, /**< The style properties in the 2 states are identical */ + LV_STYLE_STATE_CMP_DIFF_REDRAW, /**< The differences can be shown with a simple redraw */ + LV_STYLE_STATE_CMP_DIFF_DRAW_PAD, /**< The differences can be shown with a simple redraw */ + LV_STYLE_STATE_CMP_DIFF_LAYOUT, /**< The differences can be shown with a simple redraw */ } lv_style_state_cmp_t; typedef uint32_t lv_style_selector_t; diff --git a/src/display/lv_display_private.h b/src/display/lv_display_private.h index 7e262d7ea..bcdc95c46 100644 --- a/src/display/lv_display_private.h +++ b/src/display/lv_display_private.h @@ -26,7 +26,7 @@ extern "C" { * DEFINES *********************/ #ifndef LV_INV_BUF_SIZE -#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas*/ +#define LV_INV_BUF_SIZE 32 /**< Buffer size for invalid areas */ #endif /********************** @@ -57,7 +57,8 @@ struct lv_display_t { /** Vertical offset from the full / physical display. Set to 0 for fullscreen mode.*/ int32_t offset_y; - uint32_t dpi; /** DPI (dot per inch) of the display. Default value is `LV_DPI_DEF`.*/ + /** DPI (dot per inch) of the display. Default value is `LV_DPI_DEF`.*/ + uint32_t dpi; /*--------------------- * Buffering @@ -75,16 +76,18 @@ struct lv_display_t { /** * Used to wait while flushing is ready. * It can do any complex logic to wait, including semaphores, mutexes, polling flags, etc. - * If not set `flushing` flag is used which can be cleared with `lv_display_flush_ready()`*/ + * If not set `flushing` flag is used which can be cleared with `lv_display_flush_ready()` */ lv_display_flush_wait_cb_t flush_wait_cb; - /*1: flushing is in progress. (It can't be a bit field because when it's cleared from IRQ Read-Modify-Write issue might occur)*/ + /** 1: flushing is in progress. (It can't be a bit field because when it's cleared from IRQ + * Read-Modify-Write issue might occur) */ volatile int flushing; - /*1: It was the last chunk to flush. (It can't be a bit field because when it's cleared from IRQ Read-Modify-Write issue might occur)*/ + /** 1: It was the last chunk to flush. (It can't be a bit field because when it's cleared + * from IRQ Read-Modify-Write issue might occur) */ volatile int flushing_last; - volatile uint32_t last_area : 1; /*1: the last area is being rendered*/ - volatile uint32_t last_part : 1; /*1: the last part of the current area is being rendered*/ + volatile uint32_t last_area : 1; /**< 1: last area is being rendered */ + volatile uint32_t last_part : 1; /**< 1: last part of the current area is being rendered */ lv_display_render_mode_t render_mode; uint32_t antialiasing : 1; /**< 1: anti-aliasing is enabled on this display.*/ @@ -103,7 +106,7 @@ struct lv_display_t { /** Double buffer sync areas (redrawn during last refresh) */ lv_ll_t sync_areas; - lv_draw_buf_t _static_buf1; /*Used when user pass in a raw buffer as display draw buffer*/ + lv_draw_buf_t _static_buf1; /**< Used when user pass in a raw buffer as display draw buffer */ lv_draw_buf_t _static_buf2; /*--------------------- * Layer @@ -126,7 +129,7 @@ struct lv_display_t { lv_obj_t * scr_to_load; /**< The screen prepared to load in lv_screen_load_anim*/ uint32_t screen_cnt; uint8_t draw_prev_over_act : 1;/** 1: Draw previous screen over active screen*/ - uint8_t del_prev : 1; /** 1: Automatically delete the previous screen when the screen load animation is ready*/ + uint8_t del_prev : 1; /** 1: Automatically delete the previous screen when the screen load animation is ready*/ /*--------------------- * Others @@ -141,8 +144,7 @@ struct lv_display_t { uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/ uint32_t rotation : 2; /**< Element of lv_display_rotation_t*/ - /**< The theme assigned to the screen*/ - lv_theme_t * theme; + lv_theme_t * theme; /**< The theme assigned to the screen*/ /** A timer which periodically checks the dirty areas and refreshes them*/ lv_timer_t * refr_timer; diff --git a/src/draw/lv_draw.h b/src/draw/lv_draw.h index b0060ea86..c4b112f8d 100644 --- a/src/draw/lv_draw.h +++ b/src/draw/lv_draw.h @@ -28,7 +28,7 @@ extern "C" { * DEFINES *********************/ #define LV_DRAW_UNIT_NONE 0 -#define LV_DRAW_UNIT_IDLE -1 /*The draw unit is idle, new dispatching might be requested to try again*/ +#define LV_DRAW_UNIT_IDLE -1 /**< The draw unit is idle, new dispatching might be requested to try again */ #if LV_DRAW_TRANSFORM_USE_MATRIX #if !LV_USE_MATRIX diff --git a/src/draw/lv_draw_buf.h b/src/draw/lv_draw_buf.h index 8c6e98dbe..d3520cffb 100644 --- a/src/draw/lv_draw_buf.h +++ b/src/draw/lv_draw_buf.h @@ -22,7 +22,7 @@ extern "C" { * DEFINES *********************/ -/*Use this value to let LVGL calculate stride automatically*/ +/** Use this value to let LVGL calculate stride automatically */ #define LV_STRIDE_AUTO 0 LV_EXPORT_CONST_INT(LV_STRIDE_AUTO); @@ -32,9 +32,9 @@ LV_EXPORT_CONST_INT(LV_STRIDE_AUTO); typedef struct { lv_image_header_t header; - uint32_t data_size; /*Total buf size in bytes*/ + uint32_t data_size; /**< Total buf size in bytes */ uint8_t * data; - void * unaligned_data; /*Unaligned address of `data`, used internally by lvgl*/ + void * unaligned_data; /**< Unaligned address of `data`, used internally by lvgl */ } lv_draw_buf_t; /** @@ -46,7 +46,7 @@ typedef struct { #define LV_DRAW_BUF_STRIDE(w, cf) \ LV_ROUND_UP(((w) * LV_COLOR_FORMAT_GET_BPP(cf) + 7) / 8, LV_DRAW_BUF_STRIDE_ALIGN) -/* Allocate a slightly larger buffer, so we can adjust the start address to meet alignment */ +/** Allocate a slightly larger buffer, so we can adjust the start address to meet alignment */ #define LV_DRAW_BUF_SIZE(w, h, cf) \ (LV_DRAW_BUF_STRIDE(w, cf) * (h) + LV_DRAW_BUF_ALIGN + \ LV_COLOR_INDEXED_PALETTE_SIZE(cf) * sizeof(lv_color32_t)) @@ -105,12 +105,13 @@ void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t * handlers); /** * Initialize the draw buffer with given handlers. * - * @param handlers the draw buffer handlers to set - * @param buf_malloc_cb the callback to allocate memory for the buffer - * @param buf_free_cb the callback to free memory of the buffer - * @param align_pointer_cb the callback to align the buffer - * @param invalidate_cache_cb the callback to invalidate the cache of the buffer - * @param width_to_stride_cb the callback to calculate the stride based on the width and color format + * @param handlers the draw buffer handlers to set + * @param buf_malloc_cb the callback to allocate memory for the buffer + * @param buf_free_cb the callback to free memory of the buffer + * @param align_pointer_cb the callback to align the buffer + * @param invalidate_cache_cb the callback to invalidate the cache of the buffer + * @param flush_cache_cb ??? + * @param width_to_stride_cb the callback to calculate the stride based on the width and color format */ void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t * handlers, lv_draw_buf_malloc_cb buf_malloc_cb, diff --git a/src/draw/lv_draw_label_private.h b/src/draw/lv_draw_label_private.h index 03b68d774..163651da5 100644 --- a/src/draw/lv_draw_label_private.h +++ b/src/draw/lv_draw_label_private.h @@ -42,14 +42,14 @@ struct lv_draw_label_hint_t { }; struct lv_draw_glyph_dsc_t { - void * glyph_data; /*Depends on `format` field, it could be image source or draw buf of bitmap or vector data.*/ + void * glyph_data; /**< Depends on `format` field, it could be image source or draw buf of bitmap or vector data. */ lv_font_glyph_format_t format; const lv_area_t * letter_coords; const lv_area_t * bg_coords; const lv_font_glyph_dsc_t * g; lv_color_t color; lv_opa_t opa; - lv_draw_buf_t * _draw_buf; /*a shared draw buf for get_bitmap, do not use it directly, use glyph_data instead*/ + lv_draw_buf_t * _draw_buf; /**< a shared draw buf for get_bitmap, do not use it directly, use glyph_data instead */ }; diff --git a/src/draw/lv_draw_line.h b/src/draw/lv_draw_line.h index f070d0fe4..72430fa79 100644 --- a/src/draw/lv_draw_line.h +++ b/src/draw/lv_draw_line.h @@ -38,7 +38,7 @@ typedef struct { lv_blend_mode_t blend_mode : 2; uint8_t round_start : 1; uint8_t round_end : 1; - uint8_t raw_end : 1; /*Do not bother with perpendicular line ending if it's not visible for any reason*/ + uint8_t raw_end : 1; /**< Do not bother with perpendicular line ending if it's not visible for any reason */ } lv_draw_line_dsc_t; /********************** diff --git a/src/draw/lv_draw_private.h b/src/draw/lv_draw_private.h index efebd66e1..6978d6ad4 100644 --- a/src/draw/lv_draw_private.h +++ b/src/draw/lv_draw_private.h @@ -54,7 +54,7 @@ struct lv_draw_task_t { lv_matrix_t matrix; #endif - volatile int state; /*int instead of lv_draw_task_state_t to be sure its atomic*/ + volatile int state; /** int instead of lv_draw_task_state_t to be sure its atomic */ void * draw_dsc; diff --git a/src/draw/lv_draw_triangle.h b/src/draw/lv_draw_triangle.h index b825e5311..b1ad8e58b 100644 --- a/src/draw/lv_draw_triangle.h +++ b/src/draw/lv_draw_triangle.h @@ -38,7 +38,7 @@ typedef struct { /** * Initialize a triangle draw descriptor - * @param dsc pointer to a draw descriptor + * @param draw_dsc pointer to a draw descriptor */ void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * draw_dsc); @@ -52,7 +52,7 @@ lv_draw_triangle_dsc_t * lv_draw_task_get_triangle_dsc(lv_draw_task_t * task); /** * Create a triangle draw task * @param layer pointer to a layer - * @param dsc pointer to an initialized `lv_draw_triangle_dsc_t` variable + * @param draw_dsc pointer to an initialized `lv_draw_triangle_dsc_t` object */ void lv_draw_triangle(lv_layer_t * layer, const lv_draw_triangle_dsc_t * draw_dsc); diff --git a/src/draw/lv_image_decoder.h b/src/draw/lv_image_decoder.h index 8c3d690f7..e898edc9d 100644 --- a/src/draw/lv_image_decoder.h +++ b/src/draw/lv_image_decoder.h @@ -95,18 +95,18 @@ lv_result_t lv_image_decoder_get_info(const void * src, lv_image_header_t * head /** * Open an image. * Try the created image decoders one by one. Once one is able to open the image that decoder is saved in `dsc` - * @param dsc describes a decoding session. Simply a pointer to an `lv_image_decoder_dsc_t` variable. - * @param src the image source. Can be - * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`) - * 2) Variable: Pointer to an `lv_image_dsc_t` variable - * 3) Symbol: E.g. `LV_SYMBOL_OK` - * @param args args about how the image should be opened. + * @param dsc describes a decoding session. Simply a pointer to an `lv_image_decoder_dsc_t` variable. + * @param src the image source. Can be + * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_drv_register())`) + * 2) Variable: Pointer to an `lv_image_dsc_t` variable + * 3) Symbol: E.g. `LV_SYMBOL_OK` + * @param args args about how the image should be opened. * @return LV_RESULT_OK: opened the image. `dsc->decoded` and `dsc->header` are set. * LV_RESULT_INVALID: none of the registered image decoders were able to open the image. */ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, const lv_image_decoder_args_t * args); -/*** +/** * Decode `full_area` pixels incrementally by calling in a loop. Set `decoded_area` to `LV_COORD_MIN` on first call. * @param dsc image decoder descriptor * @param full_area input parameter. the full area to decode after enough subsequent calls diff --git a/src/draw/lv_image_decoder_private.h b/src/draw/lv_image_decoder_private.h index 1005176a6..27ef26140 100644 --- a/src/draw/lv_image_decoder_private.h +++ b/src/draw/lv_image_decoder_private.h @@ -34,11 +34,11 @@ extern "C" { * all field are zero or false. */ struct lv_image_decoder_args_t { - bool stride_align; /*Whether stride should be aligned*/ - bool premultiply; /*Whether image should be premultiplied or not after decoding*/ - bool no_cache; /*When set, decoded image won't be put to cache, and decoder open will also ignore cache.*/ - bool use_indexed; /*Decoded indexed image as is. Convert to ARGB8888 if false.*/ - bool flush_cache; /*Whether to flush the data cache after decoding*/ + bool stride_align; /**< Whether stride should be aligned */ + bool premultiply; /**< Whether image should be premultiplied or not after decoding */ + bool no_cache; /**< When set, decoded image won't be put to cache, and decoder open will also ignore cache. */ + bool use_indexed; /**< Decoded indexed image as is. Convert to ARGB8888 if false. */ + bool flush_cache; /**< Whether to flush the data cache after decoding */ }; struct lv_image_decoder_t { diff --git a/src/draw/lv_image_dsc.h b/src/draw/lv_image_dsc.h index 567666a8d..6a92db91a 100644 --- a/src/draw/lv_image_dsc.h +++ b/src/draw/lv_image_dsc.h @@ -70,49 +70,49 @@ typedef enum lv_image_flags_t { typedef enum { LV_IMAGE_COMPRESS_NONE = 0, - LV_IMAGE_COMPRESS_RLE, /*LVGL custom RLE compression*/ + LV_IMAGE_COMPRESS_RLE, /**< LVGL custom RLE compression */ LV_IMAGE_COMPRESS_LZ4, } lv_image_compress_t; #if LV_BIG_ENDIAN_SYSTEM typedef struct { - uint32_t reserved_2: 16; /*Reserved to be used later*/ - uint32_t stride: 16; /*Number of bytes in a row*/ + uint32_t reserved_2: 16; /**< Reserved to be used later*/ + uint32_t stride: 16; /**< Number of bytes in a row*/ uint32_t h: 16; uint32_t w: 16; - uint32_t flags: 16; /*Image flags, see `lv_image_flags_t`*/ - uint32_t cf : 8; /*Color format: See `lv_color_format_t`*/ - uint32_t magic: 8; /*Magic number. Must be LV_IMAGE_HEADER_MAGIC*/ + uint32_t flags: 16; /**< Image flags, see `lv_image_flags_t`*/ + uint32_t cf : 8; /**< Color format: See `lv_color_format_t`*/ + uint32_t magic: 8; /**< Magic number. Must be LV_IMAGE_HEADER_MAGIC*/ } lv_image_header_t; #else typedef struct { - uint32_t magic: 8; /*Magic number. Must be LV_IMAGE_HEADER_MAGIC*/ - uint32_t cf : 8; /*Color format: See `lv_color_format_t`*/ - uint32_t flags: 16; /*Image flags, see `lv_image_flags_t`*/ + uint32_t magic: 8; /**< Magic number. Must be LV_IMAGE_HEADER_MAGIC*/ + uint32_t cf : 8; /**< Color format: See `lv_color_format_t`*/ + uint32_t flags: 16; /**< Image flags, see `lv_image_flags_t`*/ uint32_t w: 16; uint32_t h: 16; - uint32_t stride: 16; /*Number of bytes in a row*/ - uint32_t reserved_2: 16; /*Reserved to be used later*/ + uint32_t stride: 16; /**< Number of bytes in a row*/ + uint32_t reserved_2: 16; /**< Reserved to be used later*/ } lv_image_header_t; #endif typedef struct { void * buf; - uint32_t stride; /*Number of bytes in a row*/ + uint32_t stride; /**< Number of bytes in a row*/ } lv_yuv_plane_t; typedef union { - lv_yuv_plane_t yuv; /*packed format*/ + lv_yuv_plane_t yuv; /**< packed format*/ struct { lv_yuv_plane_t y; lv_yuv_plane_t u; lv_yuv_plane_t v; - } planar; /*planar format with 3 plane*/ + } planar; /**< planar format with 3 plane*/ struct { lv_yuv_plane_t y; lv_yuv_plane_t uv; - } semi_planar; /*planar format with 2 plane*/ + } semi_planar; /**< planar format with 2 plane*/ } lv_yuv_buf_t; /** diff --git a/src/draw/sw/blend/lv_draw_sw_blend_private.h b/src/draw/sw/blend/lv_draw_sw_blend_private.h index 9582049e6..532f4c966 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_private.h +++ b/src/draw/sw/blend/lv_draw_sw_blend_private.h @@ -33,14 +33,14 @@ extern "C" { struct lv_draw_sw_blend_dsc_t { const lv_area_t * blend_area; /**< The area with absolute coordinates to draw on `layer->buf` * will be clipped to `layer->clip_area` */ - const void * src_buf; /**< Pointer to an image to blend. If set `fill_color` is ignored */ + const void * src_buf; /**< Pointer to an image to blend. If set `fill_color` is ignored */ uint32_t src_stride; lv_color_format_t src_color_format; const lv_area_t * src_area; lv_opa_t opa; /**< The overall opacity*/ lv_color_t color; /**< Fill color*/ const lv_opa_t * mask_buf; /**< NULL if ignored, or an alpha mask to apply on `blend_area`*/ - lv_draw_sw_mask_res_t mask_res; /**< The result of the previous mask operation */ + lv_draw_sw_mask_res_t mask_res; /**< The result of the previous mask operation */ const lv_area_t * mask_area; /**< The area of `mask_buf` with absolute coordinates*/ int32_t mask_stride; lv_blend_mode_t blend_mode; /**< E.g. LV_BLEND_MODE_ADDITIVE*/ diff --git a/src/draw/sw/lv_draw_sw.h b/src/draw/sw/lv_draw_sw.h index 9e51ea286..bd00769e4 100644 --- a/src/draw/sw/lv_draw_sw.h +++ b/src/draw/sw/lv_draw_sw.h @@ -69,7 +69,7 @@ void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_ /** * Draw an image with SW render. It handles image decoding, tiling, transformations, and recoloring. * @param draw_unit pointer to a draw unit - * @param dsc the draw descriptor + * @param draw_dsc the draw descriptor * @param coords the coordinates of the image */ void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, @@ -101,7 +101,7 @@ void lv_draw_sw_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc) /** * Blend a layer with SW render * @param draw_unit pointer to a draw unit - * @param dsc the draw descriptor + * @param draw_dsc the draw descriptor * @param coords the coordinates of the layer */ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); @@ -124,12 +124,12 @@ void lv_draw_sw_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_rect_ds /** * Used internally to get a transformed are of an image * @param draw_unit pointer to a draw unit - * @param dest_area the area to calculate, i.e. get this area from the transformed image - * @param src_buf the source buffer + * @param dest_area area to calculate, i.e. get this area from the transformed image + * @param src_buf source buffer * @param src_w source buffer width in pixels * @param src_h source buffer height in pixels * @param src_stride source buffer stride in bytes - * @param dsc the draw descriptor + * @param draw_dsc draw descriptor * @param sup supplementary data * @param cf color format of the source buffer * @param dest_buf the destination buffer @@ -151,6 +151,7 @@ void lv_draw_sw_vector(lv_draw_unit_t * draw_unit, const lv_draw_vector_task_dsc * Swap the upper and lower byte of an RGB565 buffer. * Might be required if a 8bit parallel port or an SPI port send the bytes in the wrong order. * The bytes will be swapped in place. + * @param buf pointer to buffer * @param buf_size_px number of pixels in the buffer */ void lv_draw_sw_rgb565_swap(void * buf, uint32_t buf_size_px); diff --git a/src/draw/sw/lv_draw_sw_gradient.h b/src/draw/sw/lv_draw_sw_gradient.h index a0bec58e1..647affc97 100644 --- a/src/draw/sw/lv_draw_sw_gradient.h +++ b/src/draw/sw/lv_draw_sw_gradient.h @@ -44,6 +44,8 @@ typedef lv_color_t lv_grad_color_t; * @param dsc The gradient descriptor to use * @param range The range to use in computation. * @param frac The current part used in the range. frac is in [0; range] + * @param color_out ??? + * @param opa_out ??? */ void /* LV_ATTRIBUTE_FAST_MEM */ lv_gradient_color_calculate(const lv_grad_dsc_t * dsc, int32_t range, diff --git a/src/draw/sw/lv_draw_sw_mask.h b/src/draw/sw/lv_draw_sw_mask.h index 22a0d6700..3f7b306e4 100644 --- a/src/draw/sw/lv_draw_sw_mask.h +++ b/src/draw/sw/lv_draw_sw_mask.h @@ -119,15 +119,15 @@ void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t * param, int3 /** *Initialize a line mask from a point and an angle. - * @param param pointer to a `lv_draw_mask_param_t` to initialize - * @param px X coordinate of a point of the line - * @param py X coordinate of a point of the line - * @param angle right 0 deg, bottom: 90 - * @param side and element of `lv_draw_mask_line_side_t` to describe which side to keep. + * @param param pointer to a `lv_draw_mask_param_t` to initialize + * @param px X coordinate of a point of the line + * @param py X coordinate of a point of the line + * @param angle right 0 deg, bottom: 90 + * @param side an element of `lv_draw_mask_line_side_t` to describe which side to keep. * With `LV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT` and horizontal line all pixels are kept * With `LV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM` and vertical line all pixels are kept */ -void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t p1x, int32_t py, int16_t angle, +void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t px, int32_t py, int16_t angle, lv_draw_sw_mask_line_side_t side); /** diff --git a/src/draw/sw/lv_draw_sw_mask_private.h b/src/draw/sw/lv_draw_sw_mask_private.h index a749ac745..44d3f87d5 100644 --- a/src/draw/sw/lv_draw_sw_mask_private.h +++ b/src/draw/sw/lv_draw_sw_mask_private.h @@ -26,20 +26,21 @@ extern "C" { typedef struct { uint8_t * buf; - lv_opa_t * cir_opa; /*Opacity of values on the circumference of an 1/4 circle*/ - uint16_t * x_start_on_y; /*The x coordinate of the circle for each y value*/ - uint16_t * opa_start_on_y; /*The index of `cir_opa` for each y value*/ - int32_t life; /*How many times the entry way used*/ - uint32_t used_cnt; /*Like a semaphore to count the referencing masks*/ - int32_t radius; /*The radius of the entry*/ + lv_opa_t * cir_opa; /**< Opacity of values on the circumference of an 1/4 circle */ + uint16_t * x_start_on_y; /**< The x coordinate of the circle for each y value */ + uint16_t * opa_start_on_y; /**< The index of `cir_opa` for each y value */ + int32_t life; /**< How many times the entry way used */ + uint32_t used_cnt; /**< Like a semaphore to count the referencing masks */ + int32_t radius; /**< The radius of the entry */ } lv_draw_sw_mask_radius_circle_dsc_t; + struct lv_draw_sw_mask_common_dsc_t { lv_draw_sw_mask_xcb_t cb; lv_draw_sw_mask_type_t type; }; struct lv_draw_sw_mask_line_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -53,31 +54,31 @@ struct lv_draw_sw_mask_line_param_t { lv_draw_sw_mask_line_side_t side : 2; } cfg; - /*A point of the line*/ + /** A point of the line */ lv_point_t origo; - /*X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?*/ + /** X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y? */ int32_t xy_steep; - /*Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?*/ + /** Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X? */ int32_t yx_steep; - /*Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines*/ + /** Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines */ int32_t steep; - /*Steepness in 1 px in 0..255 range. Used only by flat lines.*/ + /** Steepness in 1 px in 0..255 range. Used only by flat lines. */ int32_t spx; - /*1: It's a flat line? (Near to horizontal)*/ + /** 1: It's a flat line? (Near to horizontal) */ uint8_t flat : 1; - /*Invert the mask. The default is: Keep the left part. - *It is used to select left/right/top/bottom*/ + /** Invert the mask. The default is: Keep the left part. + *It is used to select left/right/top/bottom */ uint8_t inv: 1; }; struct lv_draw_sw_mask_angle_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -92,13 +93,13 @@ struct lv_draw_sw_mask_angle_param_t { }; struct lv_draw_sw_mask_radius_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { lv_area_t rect; int32_t radius; - /*Invert the mask. 0: Keep the pixels inside.*/ + /** Invert the mask. 0: Keep the pixels inside. */ uint8_t outer: 1; } cfg; @@ -106,7 +107,7 @@ struct lv_draw_sw_mask_radius_param_t { }; struct lv_draw_sw_mask_fade_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -120,7 +121,7 @@ struct lv_draw_sw_mask_fade_param_t { }; struct lv_draw_sw_mask_map_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { diff --git a/src/font/lv_binfont_loader.h b/src/font/lv_binfont_loader.h index c8537ebae..b0043ea78 100644 --- a/src/font/lv_binfont_loader.h +++ b/src/font/lv_binfont_loader.h @@ -28,10 +28,10 @@ extern "C" { /** * Loads a `lv_font_t` object from a binary font file - * @param path path where the font file is located - * @return pointer to font where to load + * @param path path to font file + * @return pointer to font where to load */ -lv_font_t * lv_binfont_create(const char * font_name); +lv_font_t * lv_binfont_create(const char * path); #if LV_USE_FS_MEMFS /** diff --git a/src/font/lv_font.h b/src/font/lv_font.h index 13a7e080b..2f172b9f8 100644 --- a/src/font/lv_font.h +++ b/src/font/lv_font.h @@ -60,7 +60,7 @@ typedef struct { uint16_t box_h; /**< Height of the glyph's bounding box*/ int16_t ofs_x; /**< x offset of the bounding box*/ int16_t ofs_y; /**< y offset of the bounding box*/ - lv_font_glyph_format_t format; /**< Font format of the glyph see lv_font_glyph_format_t*/ + lv_font_glyph_format_t format; /**< Font format of the glyph see lv_font_glyph_format_t */ uint8_t is_placeholder: 1; /**< Glyph is missing. But placeholder will still be displayed*/ union { diff --git a/src/font/lv_font_fmt_txt.h b/src/font/lv_font_fmt_txt.h index 8f299010d..4eeb0c6e1 100644 --- a/src/font/lv_font_fmt_txt.h +++ b/src/font/lv_font_fmt_txt.h @@ -120,7 +120,7 @@ typedef struct { const void * glyph_ids; const int8_t * values; uint32_t pair_cnt : 30; - uint32_t glyph_ids_size : 2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/ + uint32_t glyph_ids_size : 2; /**< 0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t` */ } lv_font_fmt_txt_kern_pair_t; /** More complex but more optimal class based kern value storage*/ @@ -133,9 +133,9 @@ typedef struct { 3. value = class_pair_values[(left_class-1)*right_class_cnt + (right_class-1)] */ - const int8_t * class_pair_values; /*left_class_cnt * right_class_cnt value*/ - const uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ - const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + const int8_t * class_pair_values; /**< left_class_cnt * right_class_cnt value */ + const uint8_t * left_class_mapping; /**< Map the glyph_ids to classes: index -> glyph_id -> class_id */ + const uint8_t * right_class_mapping; /**< Map the glyph_ids to classes: index -> glyph_id -> class_id */ uint8_t left_class_cnt; uint8_t right_class_cnt; } lv_font_fmt_txt_kern_classes_t; @@ -147,16 +147,16 @@ typedef enum { LV_FONT_FMT_TXT_COMPRESSED_NO_PREFILTER = 1, } lv_font_fmt_txt_bitmap_format_t; -/*Describe store additional data for fonts*/ +/** Describe store for additional data for fonts */ typedef struct { - /*The bitmaps of all glyphs*/ + /** The bitmaps of all glyphs */ const uint8_t * glyph_bitmap; - /*Describe the glyphs*/ + /** Describe the glyphs */ const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc; - /*Map the glyphs to Unicode characters. - *Array of `lv_font_cmap_fmt_txt_t` variables*/ + /** Map the glyphs to Unicode characters. + *Array of `lv_font_cmap_fmt_txt_t` variables */ const lv_font_fmt_txt_cmap_t * cmaps; /** @@ -166,19 +166,19 @@ typedef struct { */ const void * kern_dsc; - /*Scale kern values in 12.4 format*/ + /** Scale kern values in 12.4 format */ uint16_t kern_scale; - /*Number of cmap tables*/ + /** Number of cmap tables */ uint16_t cmap_num : 9; - /*Bit per pixel: 1, 2, 3, 4, 8*/ + /** Bit per pixel: 1, 2, 3, 4, 8 */ uint16_t bpp : 4; - /*Type of `kern_dsc`*/ + /** Type of `kern_dsc` */ uint16_t kern_classes : 1; - /* + /** * storage format of the bitmap * from `lv_font_fmt_txt_bitmap_format_t` */ diff --git a/src/indev/lv_indev_private.h b/src/indev/lv_indev_private.h index d4aa27c97..fc1ed4d16 100644 --- a/src/indev/lv_indev_private.h +++ b/src/indev/lv_indev_private.h @@ -24,10 +24,10 @@ extern "C" { **********************/ struct lv_indev_t { - /**< Input device type*/ + /** Input device type*/ lv_indev_type_t type; - /**< Function pointer to read input device data.*/ + /** Function pointer to read input device data.*/ lv_indev_read_cb_t read_cb; lv_indev_state_t state; /**< Current state of the input device.*/ diff --git a/src/layouts/flex/lv_flex.h b/src/layouts/flex/lv_flex.h index c853d1ea7..9724f9b1c 100644 --- a/src/layouts/flex/lv_flex.h +++ b/src/layouts/flex/lv_flex.h @@ -61,7 +61,7 @@ typedef enum { **********************/ /** - * Initialize a flex layout the default values + * Initialize a flex layout to default values */ void lv_flex_init(void); diff --git a/src/misc/cache/lv_cache.h b/src/misc/cache/lv_cache.h index 3241539ab..76c0da062 100644 --- a/src/misc/cache/lv_cache.h +++ b/src/misc/cache/lv_cache.h @@ -36,14 +36,14 @@ extern "C" { /** * Create a cache object with the given parameters. * @param cache_class The class of the cache. Currently only support one two builtin classes: - * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. - * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. + * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. + * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. * @param node_size The node size is the size of the data stored in the cache.. * @param max_size The max size is the maximum amount of memory or count that the cache can hold. - * - lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cache. - * - lv_cache_class_lru_rb_size: max_size is the maximum size of the cache in bytes. + * - lv_cache_class_lru_rb_count: max_size is the maximum count of nodes in the cache. + * - lv_cache_class_lru_rb_size: max_size is the maximum size of the cache in bytes. * @param ops A set of operations that can be performed on the cache. See lv_cache_ops_t for details. - * @return Returns a pointer to the created cache object on success, NULL on error. + * @return Returns a pointer to the created cache object on success, `NULL` on error. */ lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class, size_t node_size, size_t max_size, @@ -57,25 +57,25 @@ lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class, void lv_cache_destroy(lv_cache_t * cache, void * user_data); /** - * Acquire a cache entry with the given key. If the entry is not in the cache, it will return NULL as it is not found. - * If the entry is found, it's priority will be changed by the cache's policy. And the lv_entry_t::ref count will be incremented. + * Acquire a cache entry with the given key. If entry not in cache, it will return `NULL` (not found). + * If the entry is found, it's priority will be changed by the cache's policy. And the `lv_cache_entry_t::ref_cnt` will be incremented. * @param cache The cache object pointer to acquire the entry. * @param key The key of the entry to acquire. * @param user_data A user data pointer that will be passed to the create callback. - * @return Returns a pointer to the acquired cache entry on success with lv_entry_t::ref count incremented, NULL on error. + * @return Returns a pointer to the acquired cache entry on success with `lv_cache_entry_t::ref_cnt` incremented, `NULL` on error. */ lv_cache_entry_t * lv_cache_acquire(lv_cache_t * cache, const void * key, void * user_data); /** * Acquire a cache entry with the given key. If the entry is not in the cache, it will create a new entry with the given key. - * If the entry is found, it's priority will be changed by the cache's policy. And the lv_entry_t::ref count will be incremented. - * If you want to use this API to simplify the code, you should provide a lv_cache_ops_t::create_cb that creates a new entry with the given key. + * If the entry is found, it's priority will be changed by the cache's policy. And the `lv_cache_entry_t::ref_cnt` will be incremented. + * If you want to use this API to simplify the code, you should provide a @lv_cache_ops_t::create_cb that creates a new entry with the given key. * This API is a combination of lv_cache_acquire() and lv_cache_add(). The effect is the same as calling lv_cache_acquire() and lv_cache_add() separately. * And the internal impact on cache is also consistent with these two APIs. * @param cache The cache object pointer to acquire the entry. * @param key The key of the entry to acquire or create. * @param user_data A user data pointer that will be passed to the create callback. - * @return Returns a pointer to the acquired or created cache entry on success with lv_entry_t::ref count incremented, NULL on error. + * @return Returns a pointer to the acquired or created cache entry on success with `lv_cache_entry_t::ref_cnt` incremented, `NULL` on error. */ lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * key, void * user_data); @@ -84,12 +84,12 @@ lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * k * @param cache The cache object pointer to add the entry. * @param key The key of the entry to add. * @param user_data A user data pointer that will be passed to the create callback. - * @return Returns a pointer to the added cache entry on success with lv_entry_t::ref count incremented, NULL on error. + * @return Returns a pointer to the added cache entry on success with `lv_cache_entry_t::ref_cnt` incremented, `NULL` on error. */ lv_cache_entry_t * lv_cache_add(lv_cache_t * cache, const void * key, void * user_data); /** - * Release a cache entry. The lv_entry_t::ref count will be decremented. If the lv_entry_t::ref count is zero, it will issue an error. + * Release a cache entry. The `lv_cache_entry_t::ref_cnt` will be decremented. If the `lv_cache_entry_t::ref_cnt` is zero, it will issue an error. * If the entry passed to this function is the last reference to the data and the entry is marked as invalid, the cache's policy will be used to evict the entry. * @param cache The cache object pointer to release the entry. * @param entry The cache entry pointer to release. diff --git a/src/misc/cache/lv_cache_private.h b/src/misc/cache/lv_cache_private.h index 619d2b8ac..c8ac24993 100644 --- a/src/misc/cache/lv_cache_private.h +++ b/src/misc/cache/lv_cache_private.h @@ -68,7 +68,7 @@ typedef void (*lv_cache_destroy_cb_t)(lv_cache_t * cache, void * user_data); /** * The cache get function, used by the cache class to get a cache entry by its key. - * @return NULL if the key is not found. + * @return `NULL` if the key is not found. */ typedef lv_cache_entry_t * (*lv_cache_get_cb_t)(lv_cache_t * cache, const void * key, void * user_data); @@ -120,28 +120,27 @@ struct lv_cache_ops_t { * The cache entry struct */ struct lv_cache_t { - const lv_cache_class_t * clz; /**< The cache class. There are two built-in classes: + const lv_cache_class_t * clz; /**< Cache class. There are two built-in classes: * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. - * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. - */ + * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. */ - uint32_t node_size; /**< The size of a node */ + uint32_t node_size; /**< Size of a node */ - uint32_t max_size; /**< The maximum size of the cache */ - uint32_t size; /**< The current size of the cache */ + uint32_t max_size; /**< Maximum size of the cache */ + uint32_t size; /**< Current size of the cache */ - lv_cache_ops_t ops; /**< The cache operations struct lv_cache_ops_t */ + lv_cache_ops_t ops; /**< Cache operations struct lv_cache_ops_t */ - lv_mutex_t lock; /**< The cache lock used to protect the cache in multithreading environments */ + lv_mutex_t lock; /**< Cache lock used to protect the cache in multithreading environments */ - const char * name; /**< The name of the cache */ + const char * name; /**< Name of the cache */ }; /** - * The cache class struct for building custom cache classes, and there are two built-in classes. + * Cache class struct for building custom cache classes * + * Examples: * - lv_cache_class_lru_rb_count for LRU-based cache with count-based eviction policy. - * * - lv_cache_class_lru_rb_size for LRU-based cache with size-based eviction policy. */ struct lv_cache_class_t { @@ -167,9 +166,10 @@ struct lv_cache_slot_size_t; typedef struct lv_cache_slot_size_t lv_cache_slot_size_t; /** - * The cache entry slot struct - * To add new fields to the cache entry, add them to a new struct and add it to the first field of the cache data struct. - * And this one is a size slot for the cache entry. + * Cache entry slot struct + * + * To add new fields to the cache entry, add them to a new struct and add it to the first + * field of the cache data struct. And this one is a size slot for the cache entry. */ struct lv_cache_slot_size_t { size_t size; diff --git a/src/misc/lv_anim.h b/src/misc/lv_anim.h index bcc08b545..06fb88762 100644 --- a/src/misc/lv_anim.h +++ b/src/misc/lv_anim.h @@ -112,44 +112,45 @@ typedef int32_t (*lv_anim_get_value_cb_t)(lv_anim_t *); /** Callback used when the animation is deleted*/ typedef void (*lv_anim_deleted_cb_t)(lv_anim_t *); +/**< Parameter used when path is custom_bezier */ typedef struct { int16_t x1; int16_t y1; int16_t x2; int16_t y2; -} lv_anim_bezier3_para_t; /**< Parameter used when path is custom_bezier*/ +} lv_anim_bezier3_para_t; /** Describes an animation*/ struct lv_anim_t { - void * var; /**<Variable to animate*/ - lv_anim_exec_xcb_t exec_cb; /**< Function to execute to animate*/ - lv_anim_custom_exec_cb_t custom_exec_cb;/**< Function to execute to animate, - same purpose as exec_cb but different parameters*/ - lv_anim_start_cb_t start_cb; /**< Call it when the animation is starts (considering `delay`)*/ - lv_anim_completed_cb_t completed_cb; /**< Call it when the animation is fully completed*/ - lv_anim_deleted_cb_t deleted_cb; /**< Call it when the animation is deleted*/ - lv_anim_get_value_cb_t get_value_cb; /**< Get the current value in relative mode*/ - void * user_data; /**< Custom user data*/ - lv_anim_path_cb_t path_cb; /**< Describe the path (curve) of animations*/ - int32_t start_value; /**< Start value*/ - int32_t current_value; /**< Current value*/ - int32_t end_value; /**< End value*/ - int32_t duration; /**< Animation time in ms*/ - int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/ - uint32_t playback_delay; /**< Wait before play back*/ - uint32_t playback_duration; /**< Duration of playback animation*/ - uint32_t repeat_delay; /**< Wait before repeat*/ - uint32_t repeat_cnt; /**< Repeat count for the animation*/ + void * var; /**<Variable to animate*/ + lv_anim_exec_xcb_t exec_cb; /**< Function to execute to animate*/ + lv_anim_custom_exec_cb_t custom_exec_cb; /**< Function to execute to animate, + * same purpose as exec_cb but different parameters*/ + lv_anim_start_cb_t start_cb; /**< Call it when the animation is starts (considering `delay`)*/ + lv_anim_completed_cb_t completed_cb; /**< Call it when the animation is fully completed*/ + lv_anim_deleted_cb_t deleted_cb; /**< Call it when the animation is deleted*/ + lv_anim_get_value_cb_t get_value_cb; /**< Get the current value in relative mode*/ + void * user_data; /**< Custom user data*/ + lv_anim_path_cb_t path_cb; /**< Describe the path (curve) of animations*/ + int32_t start_value; /**< Start value*/ + int32_t current_value; /**< Current value*/ + int32_t end_value; /**< End value*/ + int32_t duration; /**< Animation time in ms*/ + int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/ + uint32_t playback_delay; /**< Wait before play back*/ + uint32_t playback_duration; /**< Duration of playback animation*/ + uint32_t repeat_delay; /**< Wait before repeat*/ + uint32_t repeat_cnt; /**< Repeat count for the animation*/ union lv_anim_path_para_t { - lv_anim_bezier3_para_t bezier3; /**< Parameter used when path is custom_bezier*/ + lv_anim_bezier3_para_t bezier3; /**< Parameter used when path is custom_bezier*/ } parameter; - /*Animation system use these - user shouldn't set*/ + /* Animation system use these - user shouldn't set */ uint32_t last_timer_run; - uint8_t playback_now : 1; /**< Play back is in progress*/ - uint8_t run_round : 1; /**< Indicates the animation has run in this round*/ - uint8_t start_cb_called : 1; /**< Indicates that the `start_cb` was already called*/ - uint8_t early_apply : 1; /**< 1: Apply start value immediately even is there is `delay`*/ + uint8_t playback_now : 1; /**< Play back is in progress*/ + uint8_t run_round : 1; /**< Indicates the animation has run in this round*/ + uint8_t start_cb_called : 1; /**< Indicates that the `start_cb` was already called*/ + uint8_t early_apply : 1; /**< 1: Apply start value immediately even is there is `delay`*/ }; /********************** @@ -259,7 +260,7 @@ void lv_anim_set_deleted_cb(lv_anim_t * a, lv_anim_deleted_cb_t deleted_cb); /** * Make the animation to play back to when the forward direction is ready * @param a pointer to an initialized `lv_anim_t` variable - * @param time the duration of the playback animation in milliseconds. 0: disable playback + * @param duration duration of playback animation in milliseconds. 0: disable playback */ void lv_anim_set_playback_duration(lv_anim_t * a, uint32_t duration); @@ -307,9 +308,10 @@ void lv_anim_set_user_data(lv_anim_t * a, void * user_data); /** * Set parameter for cubic bezier path * @param a pointer to an initialized `lv_anim_t` variable - * @param x1 first control point - * @param y1 - * @param y1 second control point + * @param x1 first control point X + * @param y1 first control point Y + * @param x2 second control point X + * @param y2 second control point Y */ void lv_anim_set_bezier3_param(lv_anim_t * a, int16_t x1, int16_t y1, int16_t x2, int16_t y2); diff --git a/src/misc/lv_area.h b/src/misc/lv_area.h index 1b0d80ba8..0798c74fb 100644 --- a/src/misc/lv_area.h +++ b/src/misc/lv_area.h @@ -218,17 +218,17 @@ void lv_point_precise_swap(lv_point_precise_t * p1, lv_point_precise_t * p2); #define LV_COORD_SET_SPEC(x) ((x) | LV_COORD_TYPE_SPEC) -/*Max coordinate value*/ +/** Max coordinate value */ #define LV_COORD_MAX ((1 << LV_COORD_TYPE_SHIFT) - 1) #define LV_COORD_MIN (-LV_COORD_MAX) /*Special coordinates*/ #define LV_SIZE_CONTENT LV_COORD_SET_SPEC(LV_COORD_MAX) -#define LV_PCT_STORED_MAX (LV_COORD_MAX - 1) +#define LV_PCT_STORED_MAX (LV_COORD_MAX - 1) #if LV_PCT_STORED_MAX % 2 != 0 #error LV_PCT_STORED_MAX should be an even number #endif -#define LV_PCT_POS_MAX (LV_PCT_STORED_MAX / 2) +#define LV_PCT_POS_MAX (LV_PCT_STORED_MAX / 2) #define LV_PCT(x) (LV_COORD_SET_SPEC(((x) < 0 ? (LV_PCT_POS_MAX - LV_MAX((x), -LV_PCT_POS_MAX)) : LV_MIN((x), LV_PCT_POS_MAX)))) #define LV_COORD_IS_PCT(x) ((LV_COORD_IS_SPEC(x) && LV_COORD_PLAIN(x) <= LV_PCT_STORED_MAX)) #define LV_COORD_GET_PCT(x) (LV_COORD_PLAIN(x) > LV_PCT_POS_MAX ? LV_PCT_POS_MAX - LV_COORD_PLAIN(x) : LV_COORD_PLAIN(x)) diff --git a/src/misc/lv_bidi.h b/src/misc/lv_bidi.h index b0e5f4e4a..77575efb3 100644 --- a/src/misc/lv_bidi.h +++ b/src/misc/lv_bidi.h @@ -20,8 +20,8 @@ extern "C" { /********************* * DEFINES *********************/ -/*Special non printable strong characters. - *They can be inserted to texts to affect the run's direction*/ +/** Special non printable strong characters. + * They can be inserted to texts to affect the run's direction */ #define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/ #define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/ diff --git a/src/misc/lv_color.h b/src/misc/lv_color.h index e5beb2103..13b948710 100644 --- a/src/misc/lv_color.h +++ b/src/misc/lv_color.h @@ -53,8 +53,8 @@ enum { LV_OPA_COVER = 255, }; -#define LV_OPA_MIN 2 /*Opacities below this will be transparent*/ -#define LV_OPA_MAX 253 /*Opacities above this will fully cover*/ +#define LV_OPA_MIN 2 /**< Opacities below this will be transparent */ +#define LV_OPA_MAX 253 /**< Opacities above this will fully cover */ /** * Get the pixel size of a color format in bits, bpp @@ -380,28 +380,28 @@ void lv_color16_premultiply(lv_color16_t * c, lv_opa_t a); /** * Get the luminance of a color: luminance = 0.3 R + 0.59 G + 0.11 B - * @param color a color + * @param c a color * @return the brightness [0..255] */ uint8_t lv_color_luminance(lv_color_t c); /** * Get the luminance of a color16: luminance = 0.3 R + 0.59 G + 0.11 B - * @param color a color + * @param c a color * @return the brightness [0..255] */ uint8_t lv_color16_luminance(const lv_color16_t c); /** * Get the luminance of a color24: luminance = 0.3 R + 0.59 G + 0.11 B - * @param color a color + * @param c a color * @return the brightness [0..255] */ uint8_t lv_color24_luminance(const uint8_t * c); /** * Get the luminance of a color32: luminance = 0.3 R + 0.59 G + 0.11 B - * @param color a color + * @param c a color * @return the brightness [0..255] */ uint8_t lv_color32_luminance(lv_color32_t c); diff --git a/src/misc/lv_color_op.h b/src/misc/lv_color_op.h index 7fb9d2042..0a59de35d 100644 --- a/src/misc/lv_color_op.h +++ b/src/misc/lv_color_op.h @@ -61,7 +61,7 @@ lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg); /** * Get the brightness of a color * @param c a color - * @return the brightness [0..255] + * @return brightness in range [0..255] */ uint8_t lv_color_brightness(lv_color_t c); diff --git a/src/misc/lv_fs.h b/src/misc/lv_fs.h index ba5decf1d..e594d4132 100644 --- a/src/misc/lv_fs.h +++ b/src/misc/lv_fs.h @@ -175,7 +175,7 @@ lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, u * Set the position of the 'cursor' (read write pointer) in a file * @param file_p pointer to a lv_fs_file_t variable * @param pos the new position expressed in bytes index (0: start of file) - * @param whence tells from where set the position. See lv_fs_whence_t + * @param whence tells from where to set position. See @lv_fs_whence_t * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); diff --git a/src/misc/lv_fs_private.h b/src/misc/lv_fs_private.h index 60f23d22c..e8789e6c0 100644 --- a/src/misc/lv_fs_private.h +++ b/src/misc/lv_fs_private.h @@ -31,9 +31,9 @@ struct lv_fs_file_cache_t { void * buffer; }; -/* Extended path object to specify the buffer for memory-mapped files */ +/** Extended path object to specify buffer for memory-mapped files */ struct lv_fs_path_ex_t { - char path[4]; /* This is needed to make it compatible with a normal path */ + char path[4]; /**< This is needed to make it compatible with a normal path */ const void * buffer; uint32_t size; }; diff --git a/src/misc/lv_ll.h b/src/misc/lv_ll.h index 53d1d5702..ee0836ef5 100644 --- a/src/misc/lv_ll.h +++ b/src/misc/lv_ll.h @@ -140,9 +140,10 @@ void lv_ll_swap(lv_ll_t * ll_p, void * n1_p, void * n2_p); /** * Move a node before another node in the same linked list - * @param ll_p pointer to a linked list - * @param n_act pointer to node to move - * @param n_after pointer to a node which should be after `n_act` + * + * @param ll_p pointer to a linked list + * @param n_act pointer to node to move + * @param n_after pointer to a node which should be after `n_act` */ void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after); diff --git a/src/misc/lv_log.h b/src/misc/lv_log.h index a04898343..7774ba6fc 100644 --- a/src/misc/lv_log.h +++ b/src/misc/lv_log.h @@ -23,13 +23,13 @@ extern "C" { /*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/ -#define LV_LOG_LEVEL_TRACE 0 /**< A lot of logs to give detailed information*/ -#define LV_LOG_LEVEL_INFO 1 /**< Log important events*/ -#define LV_LOG_LEVEL_WARN 2 /**< Log if something unwanted happened but didn't caused problem*/ -#define LV_LOG_LEVEL_ERROR 3 /**< Only critical issue, when the system may fail*/ -#define LV_LOG_LEVEL_USER 4 /**< Custom logs from the user*/ -#define LV_LOG_LEVEL_NONE 5 /**< Do not log anything*/ -#define LV_LOG_LEVEL_NUM 6 /**< Number of log levels*/ +#define LV_LOG_LEVEL_TRACE 0 /**< Log detailed information. */ +#define LV_LOG_LEVEL_INFO 1 /**< Log important events. */ +#define LV_LOG_LEVEL_WARN 2 /**< Log if something unwanted happened but didn't caused problem. */ +#define LV_LOG_LEVEL_ERROR 3 /**< Log only critical issues, when system may fail. */ +#define LV_LOG_LEVEL_USER 4 /**< Log only custom log messages added by the user. */ +#define LV_LOG_LEVEL_NONE 5 /**< Do not log anything. */ +#define LV_LOG_LEVEL_NUM 6 /**< Number of log levels */ LV_EXPORT_CONST_INT(LV_LOG_LEVEL_TRACE); LV_EXPORT_CONST_INT(LV_LOG_LEVEL_INFO); diff --git a/src/misc/lv_math.h b/src/misc/lv_math.h index 02870a343..05e159f13 100644 --- a/src/misc/lv_math.h +++ b/src/misc/lv_math.h @@ -26,10 +26,10 @@ extern "C" { #define LV_BEZIER_VAL_MAX (1L << LV_BEZIER_VAL_SHIFT) /**< Max time in Bezier functions (not [0..1] to use integers)*/ #define LV_BEZIER_VAL_FLOAT(f) ((int32_t)((f) * LV_BEZIER_VAL_MAX)) /**< Convert const float number cubic-bezier values to fix-point value*/ -/*Align up value x to align, align must be a power of two*/ +/** Align up value x to align, align must be a power of two */ #define LV_ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align) - 1)) -/*Round up value x to round, round can be any integer number*/ +/** Round up value x to round, round can be any integer number */ #define LV_ROUND_UP(x, round) ((((x) + ((round) - 1)) / (round)) * (round)) /********************** diff --git a/src/misc/lv_style.h b/src/misc/lv_style.h index 771149754..dcce7dcd6 100644 --- a/src/misc/lv_style.h +++ b/src/misc/lv_style.h @@ -33,18 +33,18 @@ extern "C" { * Flags for style behavior */ #define LV_STYLE_PROP_FLAG_NONE (0) /**< No special behavior */ -#define LV_STYLE_PROP_FLAG_INHERITABLE (1 << 0) /**< Inherited*/ -#define LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE (1 << 1) /**< Requires ext. draw size update when changed*/ -#define LV_STYLE_PROP_FLAG_LAYOUT_UPDATE (1 << 2) /**< Requires layout update when changed*/ -#define LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE (1 << 3) /**< Requires layout update on parent when changed*/ -#define LV_STYLE_PROP_FLAG_LAYER_UPDATE (1 << 4) /**< Affects layer handling*/ -#define LV_STYLE_PROP_FLAG_TRANSFORM (1 << 5) /**< Affects the object's transformation*/ -#define LV_STYLE_PROP_FLAG_ALL (0x3F) /**< Indicating all flags*/ +#define LV_STYLE_PROP_FLAG_INHERITABLE (1 << 0) /**< Inherited */ +#define LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE (1 << 1) /**< Requires ext. draw size update when changed */ +#define LV_STYLE_PROP_FLAG_LAYOUT_UPDATE (1 << 2) /**< Requires layout update when changed */ +#define LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE (1 << 3) /**< Requires layout update on parent when changed */ +#define LV_STYLE_PROP_FLAG_LAYER_UPDATE (1 << 4) /**< Affects layer handling */ +#define LV_STYLE_PROP_FLAG_TRANSFORM (1 << 5) /**< Affects the object's transformation */ +#define LV_STYLE_PROP_FLAG_ALL (0x3F) /**< Indicating all flags */ -/** +/* * Other constants */ -#define LV_SCALE_NONE 256 /**< Value for not zooming the image*/ +#define LV_SCALE_NONE 256 /**< Value for not zooming the image */ LV_EXPORT_CONST_INT(LV_SCALE_NONE); // *INDENT-OFF* @@ -52,16 +52,16 @@ LV_EXPORT_CONST_INT(LV_SCALE_NONE); #define LV_STYLE_CONST_INIT(var_name, prop_array) \ const lv_style_t var_name = { \ .sentinel = LV_STYLE_SENTINEL_VALUE, \ - .values_and_props = (void*)prop_array, \ + .values_and_props = (void*)prop_array, \ .has_group = 0xFFFFFFFF, \ - .prop_cnt = 255 \ + .prop_cnt = 255 \ } #else #define LV_STYLE_CONST_INIT(var_name, prop_array) \ const lv_style_t var_name = { \ - .values_and_props = prop_array, \ + .values_and_props = prop_array, \ .has_group = 0xFFFFFFFF, \ - .prop_cnt = 255, \ + .prop_cnt = 255, \ } #endif // *INDENT-ON* @@ -73,7 +73,7 @@ LV_EXPORT_CONST_INT(LV_SCALE_NONE); **********************/ /** - * Possible options how to blend opaque drawings + * Possible options for blending opaque drawings */ typedef enum { LV_BLEND_MODE_NORMAL, /**< Simply mix according to the opacity value*/ @@ -142,7 +142,7 @@ typedef struct { uint8_t stops_count; /**< The number of used stops in the array */ lv_grad_dir_t dir : 3; /**< The gradient direction. * Any of LV_GRAD_DIR_NONE, LV_GRAD_DIR_VER, LV_GRAD_DIR_HOR, - LV_GRAD_TYPE_LINEAR, LV_GRAD_TYPE_RADIAL, LV_GRAD_TYPE_CONICAL */ + * LV_GRAD_TYPE_LINEAR, LV_GRAD_TYPE_RADIAL, LV_GRAD_TYPE_CONICAL */ lv_grad_extend_t extend : 2; /**< Behaviour outside the defined range. * LV_GRAD_EXTEND_NONE, LV_GRAD_EXTEND_PAD, LV_GRAD_EXTEND_REPEAT, LV_GRAD_EXTEND_REFLECT */ #if LV_USE_DRAW_SW_COMPLEX_GRADIENTS @@ -348,7 +348,7 @@ typedef enum { typedef struct { const lv_style_prop_t * props; /**< An array with the properties to animate.*/ void * user_data; /**< A custom user data that will be passed to the animation's user_data */ - lv_anim_path_cb_t path_xcb; /**< A path for the animation.*/ + lv_anim_path_cb_t path_xcb; /**< A path for the animation.*/ uint32_t time; /**< Duration of the transition in [ms]*/ uint32_t delay; /**< Delay before the transition in [ms]*/ } lv_style_transition_dsc_t; @@ -470,8 +470,8 @@ lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, * Example: * @code * const static lv_style_prop_t trans_props[] = { LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, 0 }; - * static lv_style_transition_dsc_t trans1; - * lv_style_transition_dsc_init(&trans1, trans_props, NULL, 300, 0, NULL); + * static lv_style_transition_dsc_t trans1; + * lv_style_transition_dsc_init(&trans1, trans_props, NULL, 300, 0, NULL); * @endcode */ void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t props[], diff --git a/src/misc/lv_text_private.h b/src/misc/lv_text_private.h index 0c27e3f0b..858f59383 100644 --- a/src/misc/lv_text_private.h +++ b/src/misc/lv_text_private.h @@ -196,10 +196,10 @@ static inline bool lv_text_is_marker(uint32_t letter) /** * Give the size of an encoded character - * @param str pointer to a character in a string + * @param txt pointer to a character in a string * @return length of the encoded character (1,2,3 ...). O in invalid */ -extern uint8_t (*const lv_text_encoded_size)(const char * str); +extern uint8_t (*const lv_text_encoded_size)(const char * txt); /** * Convert a Unicode letter to encoded @@ -217,19 +217,21 @@ extern uint32_t (*const lv_text_encoded_conv_wc)(uint32_t c); /** * Decode the next encoded character from a string. - * @param txt pointer to '\0' terminated string - * @param i start index in 'txt' where to start. - * After the call it will point to the next encoded char in 'txt'. - * NULL to use txt[0] as index + * @param txt pointer to '\0' terminated string + * @param i_start start index in 'txt' where to start. + * After the call it will point to the next encoded char in 'txt'. + * NULL to use txt[0] as index * @return the decoded Unicode character or 0 on invalid data code */ -extern uint32_t (*const lv_text_encoded_next)(const char * txt, uint32_t * i); +extern uint32_t (*const lv_text_encoded_next)(const char * txt, uint32_t * i_start); /** * Get the previous encoded character form a string. - * @param txt pointer to '\0' terminated string - * @param i_start index in 'txt' where to start. After the call it will point to the previous - * encoded char in 'txt'. + * + * @param txt pointer to '\0' terminated string + * @param i_start index in 'txt' where to start. After the call it will point to the previous + * encoded char in 'txt'. + * * @return the decoded Unicode character or 0 on invalid data */ extern uint32_t (*const lv_text_encoded_prev)(const char * txt, uint32_t * i_start); @@ -247,7 +249,7 @@ extern uint32_t (*const lv_text_encoded_get_byte_id)(const char * txt, uint32_t * Convert a byte index (in an encoded text) to character index. * E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long * @param txt a '\0' terminated UTF-8 string - * @param byte_id character index + * @param byte_id byte index * @return character index of the letter at 'byte_id'th position */ extern uint32_t (*const lv_text_encoded_get_char_id)(const char * txt, uint32_t byte_id); diff --git a/src/misc/lv_timer_private.h b/src/misc/lv_timer_private.h index d7c883a47..b7f42b0a1 100644 --- a/src/misc/lv_timer_private.h +++ b/src/misc/lv_timer_private.h @@ -28,17 +28,17 @@ extern "C" { * Descriptor of a lv_timer */ struct lv_timer_t { - uint32_t period; /**< How often the timer should run*/ - uint32_t last_run; /**< Last time the timer ran*/ - lv_timer_cb_t timer_cb; /**< Timer function*/ - void * user_data; /**< Custom user data*/ - int32_t repeat_count; /**< 1: One time; -1 : infinity; n>0: residual times*/ + uint32_t period; /**< How often the timer should run */ + uint32_t last_run; /**< Last time the timer ran */ + lv_timer_cb_t timer_cb; /**< Timer function */ + void * user_data; /**< Custom user data */ + int32_t repeat_count; /**< 1: One time; -1 : infinity; n>0: residual times */ uint32_t paused : 1; uint32_t auto_delete : 1; }; typedef struct { - lv_ll_t timer_ll; /*Linked list to store the lv_timers*/ + lv_ll_t timer_ll; /**< Linked list to store the lv_timers */ bool lv_timer_run; uint8_t idle_last; diff --git a/src/misc/lv_utils.h b/src/misc/lv_utils.h index 68c3662ed..7a8d61014 100644 --- a/src/misc/lv_utils.h +++ b/src/misc/lv_utils.h @@ -35,14 +35,14 @@ extern "C" { * argument (the search key) is less that it's second (a table entry), * zero if equal, and positive if greater. * - * @note Items in the array must be in ascending order. + * @note Items in the array must be in ascending order. * * @param key Pointer to item being searched for * @param base Pointer to first element to search * @param n Number of elements * @param size Size of each element - * @param cmp Pointer to comparison function (see unicode_list_compare() as a comparison - * function example) + * @param cmp Pointer to comparison function (see unicode_list_compare() + * as a comparison function example) * * @return a pointer to a matching item, or NULL if none exists. */ |