fix(comment): remove the space after /* and before */
This commit is contained in:
@@ -11,11 +11,7 @@ TFT_eSPI tft = TFT_eSPI(); /* TFT instance */
|
||||
static uint32_t screenWidth = 320;
|
||||
static uint32_t screenHeight = 240;
|
||||
|
||||
<<<<<<< HEAD
|
||||
static lv_disp_buf_t disp_buf;
|
||||
=======
|
||||
static lv_draw_buf_t draw_buf;
|
||||
>>>>>>> xiaoxiang781216-disp
|
||||
static lv_color_t buf[screenWidth * 10];
|
||||
|
||||
#if LV_USE_LOG != 0
|
||||
|
||||
@@ -54,7 +54,8 @@ void lv_port_disp_init(void)
|
||||
* Create a buffer for drawing
|
||||
*----------------------------*/
|
||||
|
||||
/* LVGL requires a buffer where it internally draws the widgets.
|
||||
/**
|
||||
* LVGL requires a buffer where it internally draws the widgets.
|
||||
* Later this buffer will passed your display drivers `flush_cb` to copy its content to your display.
|
||||
* The buffer has to be greater than 1 display row
|
||||
*
|
||||
@@ -72,7 +73,7 @@ void lv_port_disp_init(void)
|
||||
* Similar to 2) but the buffer have to be screen sized. When LVGL is ready it will give the
|
||||
* whole frame to display. This way you only need to change the frame buffer's address instead of
|
||||
* copying the pixels.
|
||||
* */
|
||||
*/
|
||||
|
||||
/* Example for 1) */
|
||||
static lv_draw_buf_t draw_buf_dsc_1;
|
||||
|
||||
@@ -68,7 +68,8 @@ static lv_indev_state_t encoder_state;
|
||||
|
||||
void lv_port_indev_init(void)
|
||||
{
|
||||
/* Here you will find example implementation of input devices supported by LittelvGL:
|
||||
/**
|
||||
* Here you will find example implementation of input devices supported by LittelvGL:
|
||||
* - Touchpad
|
||||
* - Mouse (with cursor support)
|
||||
* - Keypad (supports GUI usage only with key)
|
||||
|
||||
@@ -125,7 +125,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
||||
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
|
||||
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
|
||||
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
|
||||
* */
|
||||
*/
|
||||
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
|
||||
#endif
|
||||
|
||||
@@ -323,11 +323,12 @@ typedef void * lv_user_data_t;
|
||||
* TEXT SETTINGS
|
||||
*=================*/
|
||||
|
||||
/* Select a character encoding for strings.
|
||||
/**
|
||||
* Select a character encoding for strings.
|
||||
* Your IDE or editor should have the same character encoding
|
||||
* - LV_TXT_ENC_UTF8
|
||||
* - LV_TXT_ENC_ASCII
|
||||
* */
|
||||
*/
|
||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||
|
||||
/*Can break (wrap) texts on these chars*/
|
||||
|
||||
2
lvgl.h
2
lvgl.h
@@ -109,7 +109,7 @@ extern "C" {
|
||||
* bugfix_in_v5_3_2();
|
||||
* #endif
|
||||
*
|
||||
* */
|
||||
*/
|
||||
#define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH)))
|
||||
|
||||
/**
|
||||
|
||||
@@ -192,7 +192,8 @@ void _lv_disp_refr_timer(lv_timer_t * tmr)
|
||||
disp_refr = tmr->user_data;
|
||||
|
||||
#if LV_USE_PERF_MONITOR == 0
|
||||
/* Ensure the timer does not run again automatically.
|
||||
/**
|
||||
* Ensure the timer does not run again automatically.
|
||||
* This is done before refreshing in case refreshing invalidates something else.
|
||||
*/
|
||||
lv_timer_pause(tmr, true);
|
||||
|
||||
@@ -133,7 +133,8 @@ void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_are
|
||||
i_next_right = y_min_i + 1;
|
||||
if(i_next_right > point_cnt - 1) i_next_right = 0;
|
||||
|
||||
/* Check if the order of points is inverted or not.
|
||||
/**
|
||||
* Check if the order of points is inverted or not.
|
||||
* The normal case is when the left point is on `y_min_i - 1`
|
||||
* Explanation:
|
||||
* if angle(p_left) < angle(p_right) -> inverted
|
||||
|
||||
@@ -101,11 +101,12 @@ typedef uint8_t lv_img_cf_t;
|
||||
/**
|
||||
* LVGL image header
|
||||
*/
|
||||
/* The first 8 bit is very important to distinguish the different source types.
|
||||
/**
|
||||
* The first 8 bit is very important to distinguish the different source types.
|
||||
* For more info see `lv_img_get_src_type()` in lv_img.c
|
||||
* On big endian systems the order is reversed so cf and always_zero must be at
|
||||
* the end of the struct.
|
||||
* */
|
||||
*/
|
||||
#if LV_BIG_ENDIAN_SYSTEM
|
||||
typedef struct {
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ lv_img_cache_entry_t * _lv_img_cache_open(const void * src, lv_color_t color)
|
||||
if(open_res == LV_RES_INV) {
|
||||
LV_LOG_WARN("Image draw cannot open the image resource");
|
||||
lv_memset_00(cached_src, sizeof(lv_img_cache_entry_t));
|
||||
cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its use */
|
||||
cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its us*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc,
|
||||
|
||||
/**
|
||||
* Initialize the image decoder module
|
||||
* */
|
||||
*/
|
||||
void _lv_img_decoder_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_img_decoder_ll), sizeof(lv_img_decoder_t));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*********************/
|
||||
/**
|
||||
* Some helper defines
|
||||
* */
|
||||
*/
|
||||
#define CELL_SHIFT 4
|
||||
#define CELL_POS_MASK ((1 << CELL_SHIFT) - 1)
|
||||
#define CELL_SPAN_MASK (CELL_POS_MASK << CELL_SHIFT)
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
#define LV_CPICKER_DEF_QF 3
|
||||
|
||||
/* The OUTER_MASK_WIDTH define is required to assist with the placing of a mask over the outer ring of the widget as when the
|
||||
/**
|
||||
* The OUTER_MASK_WIDTH define is required to assist with the placing of a mask over the outer ring of the widget as when the
|
||||
* multicoloured radial lines are calculated for the outer ring of the widget their lengths are jittering because of the
|
||||
* integer based arithmetic. From tests the maximum delta was found to be 2 so the current value is set to 3 to achieve
|
||||
* appropriate masking.
|
||||
@@ -597,16 +598,17 @@ static lv_res_t double_click_reset(lv_obj_t * obj)
|
||||
#define HSV_PTR_SWAP(sextant,r,g,b) if((sextant) & 2) { SWAPPTR((r), (b)); } if((sextant) & 4) { SWAPPTR((g), (b)); } if(!((sextant) & 6)) { \
|
||||
if(!((sextant) & 1)) { SWAPPTR((r), (g)); } } else { if((sextant) & 1) { SWAPPTR((r), (g)); } }
|
||||
|
||||
/* Based on the idea from https://www.vagrearg.org/content/hsvrgb
|
||||
Here we want to compute an approximate RGB value from a HSV input color space. We don't want to be accurate
|
||||
(for that, there's lv_color_hsv_to_rgb), but we want to be fast.
|
||||
|
||||
Few tricks are used here: Hue is in range [0; 6 * 256] (so that the sextant is in the high byte and the fractional part is in the low byte)
|
||||
both s and v are in [0; 255] range (very convenient to avoid divisions).
|
||||
|
||||
We fold all symmetry by swapping the R, G, B pointers so that the code is the same for all sextants.
|
||||
We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
|
||||
This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
|
||||
/**
|
||||
* Based on the idea from https://www.vagrearg.org/content/hsvrgb
|
||||
* Here we want to compute an approximate RGB value from a HSV input color space. We don't want to be accurate
|
||||
* (for that, there's lv_color_hsv_to_rgb), but we want to be fast.
|
||||
*
|
||||
* Few tricks are used here: Hue is in range [0; 6 * 256] (so that the sextant is in the high byte and the fractional part is in the low byte)
|
||||
* both s and v are in [0; 255] range (very convenient to avoid divisions).
|
||||
*
|
||||
* We fold all symmetry by swapping the R, G, B pointers so that the code is the same for all sextants.
|
||||
* We replace division by 255 by a division by 256, a.k.a a shift right by 8 bits.
|
||||
* This is wrong, but since this is only used to compute the pixels on the screen and not the final color, it's ok.
|
||||
*/
|
||||
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *g , uint8_t *b);
|
||||
static void fast_hsv2rgb(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *g , uint8_t *b)
|
||||
|
||||
@@ -55,7 +55,8 @@ enum {
|
||||
|
||||
typedef uint8_t lv_font_fmt_txt_cmap_type_t;
|
||||
|
||||
/* Map codepoints to a `glyph_dsc`s
|
||||
/**
|
||||
* Map codepoints to a `glyph_dsc`s
|
||||
* Several formats are supported to optimize memory usage
|
||||
* See https://github.com/lvgl/lv_font_conv/blob/master/doc/font_spec.md
|
||||
*/
|
||||
@@ -167,7 +168,8 @@ typedef struct {
|
||||
*Array of `lv_font_cmap_fmt_txt_t` variables*/
|
||||
const lv_font_fmt_txt_cmap_t * cmaps;
|
||||
|
||||
/* Store kerning values.
|
||||
/**
|
||||
* Store kerning values.
|
||||
* Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
|
||||
* depending on `kern_classes`
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ extern "C" {
|
||||
/** PXP module instance to use*/
|
||||
#define LV_GPU_NXP_PXP_ID PXP
|
||||
|
||||
/** PXP interrupt line ID */
|
||||
/** PXP interrupt line I*/
|
||||
#define LV_GPU_NXP_PXP_IRQ_ID PXP_IRQn
|
||||
|
||||
#ifndef LV_GPU_NXP_PXP_BLIT_SIZE_LIMIT
|
||||
|
||||
@@ -305,7 +305,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
||||
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
|
||||
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
|
||||
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
|
||||
* */
|
||||
*/
|
||||
#ifndef LV_USE_GPU_NXP_PXP_AUTO_INIT
|
||||
# ifdef CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
|
||||
# define LV_USE_GPU_NXP_PXP_AUTO_INIT CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
|
||||
@@ -962,7 +962,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
|
||||
* Your IDE or editor should have the same character encoding
|
||||
* - LV_TXT_ENC_UTF8
|
||||
* - LV_TXT_ENC_ASCII
|
||||
* */
|
||||
*/
|
||||
#ifndef LV_TXT_ENC
|
||||
# ifdef CONFIG_LV_TXT_ENC
|
||||
# define LV_TXT_ENC CONFIG_LV_TXT_ENC
|
||||
|
||||
@@ -83,7 +83,8 @@ extern "C" {
|
||||
* FONT SELECTION
|
||||
*******************/
|
||||
|
||||
/* NOTE: In Kconfig instead of `LV_THEME_DEFAULT_FONT_SMALL`
|
||||
/**
|
||||
* NOTE: In Kconfig instead of `LV_THEME_DEFAULT_FONT_SMALL`
|
||||
* `CONFIG_LV_THEME_DEFAULT_FONT_SMALL_<font_name>` is defined
|
||||
* hence the large selection with if-s
|
||||
*/
|
||||
|
||||
@@ -70,7 +70,8 @@ enum {
|
||||
#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!"
|
||||
#endif
|
||||
|
||||
/* Adjust color mix functions rounding.
|
||||
/**
|
||||
* Adjust color mix functions rounding.
|
||||
* GPUs might calculate color mix (blending) differently.
|
||||
* Should be in range of 0..254
|
||||
* 0: no adjustment, get the integer part of the result (round down)
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/* "free" is used as a function pointer (in lv_fs_drv_t).
|
||||
/**
|
||||
* "free" is used as a function pointer (in lv_fs_drv_t).
|
||||
* We must make sure "free" was not defined to a platform specific
|
||||
* free function, otherwise compilation would fail.
|
||||
*/
|
||||
|
||||
@@ -241,7 +241,8 @@ int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32
|
||||
if(x >= max_in) return max_out;
|
||||
if(x <= min_in) return min_out;
|
||||
|
||||
/* The equation should be:
|
||||
/**
|
||||
* The equation should be:
|
||||
* ((x - min_in) * delta_out) / delta in) + min_out
|
||||
* To avoid rounding error reorder the operations:
|
||||
* (x - min_in) * (delta_out / delta_min) + min_out
|
||||
|
||||
@@ -616,12 +616,13 @@ static uint32_t lv_txt_utf8_conv_wc(uint32_t c)
|
||||
*/
|
||||
static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i)
|
||||
{
|
||||
/* Unicode to UTF-8
|
||||
/**
|
||||
* Unicode to UTF-8
|
||||
* 00000000 00000000 00000000 0xxxxxxx -> 0xxxxxxx
|
||||
* 00000000 00000000 00000yyy yyxxxxxx -> 110yyyyy 10xxxxxx
|
||||
* 00000000 00000000 zzzzyyyy yyxxxxxx -> 1110zzzz 10yyyyyy 10xxxxxx
|
||||
* 00000000 000wwwzz zzzzyyyy yyxxxxxx -> 11110www 10zzzzzz 10yyyyyy 10xxxxxx
|
||||
* */
|
||||
*/
|
||||
|
||||
uint32_t result = 0;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ enum {
|
||||
LV_TEXT_ALIGN_LEFT, /**< Align text to left*/
|
||||
LV_TEXT_ALIGN_CENTER, /**< Align text to center*/
|
||||
LV_TEXT_ALIGN_RIGHT, /**< Align text to right*/
|
||||
LV_TEXT_ALIGN_AUTO, /**< */
|
||||
LV_TEXT_ALIGN_AUTO, /**< Align text auto*/
|
||||
};
|
||||
typedef uint8_t lv_text_align_t;
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* TODO Remove these instructions
|
||||
/**
|
||||
* TODO Remove these instructions
|
||||
* Search an replace: template -> object normal name with lower case (e.g. button, label etc.)
|
||||
* templ -> object short name with lower case(e.g. btn, label etc)
|
||||
* TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.)
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* TODO Remove these instructions
|
||||
/**
|
||||
* TODO Remove these instructions
|
||||
* Search an replace: template -> object normal name with lower case (e.g. button, label etc.)
|
||||
* templ -> object short name with lower case(e.g. btn, label etc)
|
||||
* TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.)
|
||||
|
||||
Reference in New Issue
Block a user