Imporvements fot modularity
This commit is contained in:
41
img_conf_templ.h
Normal file
41
img_conf_templ.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @file img_conf.h
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if 0 /*Remove this to enable the content (Delete the last #endif too!)*/
|
||||||
|
|
||||||
|
#ifndef IMG_CONF_H
|
||||||
|
#define IMG_CONF_H
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* INCLUDES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/*********************
|
||||||
|
* DEFINES
|
||||||
|
*********************/
|
||||||
|
|
||||||
|
/* Enable here the used images
|
||||||
|
* For example:
|
||||||
|
* #define USE_IMG_EXAMPLE 1
|
||||||
|
*
|
||||||
|
* This is compatible with the images
|
||||||
|
* generated by the image converter utility
|
||||||
|
* For more information see: www.littlev.hu */
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* TYPEDEFS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* GLOBAL PROTOTYPES
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
/**********************
|
||||||
|
* MACROS
|
||||||
|
**********************/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /*Remove this to enable the content*/
|
||||||
@@ -70,8 +70,10 @@
|
|||||||
* LV OBJ X USAGE
|
* LV OBJ X USAGE
|
||||||
* ================*/
|
* ================*/
|
||||||
|
|
||||||
|
/*Rectangle (dependencies: -*/
|
||||||
#define USE_LV_RECT 1
|
#define USE_LV_RECT 1
|
||||||
|
|
||||||
|
/*Label (dependencies: -*/
|
||||||
#define USE_LV_LABEL 1
|
#define USE_LV_LABEL 1
|
||||||
#if USE_LV_LABEL != 0
|
#if USE_LV_LABEL != 0
|
||||||
#define LV_LABEL_SCROLL_SPEED (25 * LV_DOWNSCALE) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL' mode*/
|
#define LV_LABEL_SCROLL_SPEED (25 * LV_DOWNSCALE) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL' mode*/
|
||||||
@@ -80,42 +82,53 @@
|
|||||||
#define LV_LABEL_SCROLL_REPEAT_PAUSE 500 /*Wait before the scroll begins again in ms*/
|
#define LV_LABEL_SCROLL_REPEAT_PAUSE 500 /*Wait before the scroll begins again in ms*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*Button (dependencies: lv_rect*/
|
||||||
#define USE_LV_BTN 1
|
#define USE_LV_BTN 1
|
||||||
|
|
||||||
|
/*Line (dependencies: -*/
|
||||||
#define USE_LV_LINE 1
|
#define USE_LV_LINE 1
|
||||||
|
|
||||||
#define USE_LV_IMG 1 /*In misc_conf.h USE_FSINT 1 and USE_UFS 1 are required*/
|
/*Image (dependencies: from misc: FSINT, UFS)*/
|
||||||
|
#define USE_LV_IMG 1
|
||||||
#if USE_LV_IMG != 0
|
#if USE_LV_IMG != 0
|
||||||
//#define LV_IMG_DEF_WALLPAPER img_wallpaper_var /*Comment this line to NOT use wallpaper*/
|
//#define LV_IMG_DEF_WALLPAPER img_wallpaper_var /*Comment this line to NOT use wallpaper*/
|
||||||
#endif /*USE_LV_IMG*/
|
#endif /*USE_LV_IMG*/
|
||||||
|
|
||||||
|
/*Page (dependencies: lv_rect)*/
|
||||||
#define USE_LV_PAGE 1
|
#define USE_LV_PAGE 1
|
||||||
#if USE_LV_PAGE != 0
|
#if USE_LV_PAGE != 0
|
||||||
#define LV_PAGE_ANIM_FOCUS_TIME 300 /*List focus animation time [ms] (0: turn off the animation)*/
|
#define LV_PAGE_ANIM_FOCUS_TIME 300 /*List focus animation time [ms] (0: turn off the animation)*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*List (dependencies: lv_btn, lv_label, lv_img)*/
|
||||||
#define USE_LV_LIST 1
|
#define USE_LV_LIST 1
|
||||||
|
|
||||||
|
/*Check box (dependencies: lv_btn, lv_label)*/
|
||||||
#define USE_LV_CB 1
|
#define USE_LV_CB 1
|
||||||
|
|
||||||
|
/*Progress bar (dependencies: lv_rect, lv_label)*/
|
||||||
#define USE_LV_PB 1
|
#define USE_LV_PB 1
|
||||||
|
|
||||||
|
/*LED (dependencies: lv_rect)*/
|
||||||
#define USE_LV_LED 1
|
#define USE_LV_LED 1
|
||||||
|
|
||||||
#define USE_LV_CHARTBG 1
|
/*Chart (dependencies: lv_rect, lv_line)*/
|
||||||
|
|
||||||
#define USE_LV_CHART 1
|
#define USE_LV_CHART 1
|
||||||
|
|
||||||
|
/*Text area (dependencies: lv_label, lv_page)*/
|
||||||
#define USE_LV_TA 1
|
#define USE_LV_TA 1
|
||||||
#if USE_LV_TA != 0
|
#if USE_LV_TA != 0
|
||||||
#define LV_TA_MAX_LENGTH 8
|
#define LV_TA_MAX_LENGTH 8
|
||||||
#define LV_TA_CUR_BLINK_TIME 400 /*ms*/
|
#define LV_TA_CUR_BLINK_TIME 400 /*ms*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*Button matrix (dependencies: lv_rect, lv_label)*/
|
||||||
#define USE_LV_BTNM 1
|
#define USE_LV_BTNM 1
|
||||||
|
|
||||||
|
/*Window (dependencies: lv_rect, lv_btn, lv_label, lv_img, lv_page)*/
|
||||||
#define USE_LV_WIN 1
|
#define USE_LV_WIN 1
|
||||||
|
|
||||||
|
/*Message box (dependencies: lv_rect, lv_btn, lv_label)*/
|
||||||
#define USE_LV_MBOX 1
|
#define USE_LV_MBOX 1
|
||||||
|
|
||||||
/*==================
|
/*==================
|
||||||
|
|||||||
@@ -31,11 +31,13 @@
|
|||||||
/**********************
|
/**********************
|
||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
#if USE_LV_RECT != 0
|
||||||
static void lv_draw_rect_main_mid(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
static void lv_draw_rect_main_mid(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
||||||
static void lv_draw_rect_main_corner(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
static void lv_draw_rect_main_corner(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
||||||
static void lv_draw_rect_border_straight(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
static void lv_draw_rect_border_straight(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
||||||
static void lv_draw_rect_border_corner(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
static void lv_draw_rect_border_corner(const area_t * cords_p, const area_t * mask_p, const lv_rects_t * rects_p, opa_t opa);
|
||||||
static uint16_t lv_draw_rect_radius_corr(uint16_t r, cord_t w, cord_t h);
|
static uint16_t lv_draw_rect_radius_corr(uint16_t r, cord_t w, cord_t h);
|
||||||
|
#endif /*USE_LV_RECT != 0*/
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC VARIABLES
|
* STATIC VARIABLES
|
||||||
@@ -72,6 +74,8 @@ static lv_labels_t lv_img_no_pic_labels = {
|
|||||||
/**********************
|
/**********************
|
||||||
* GLOBAL FUNCTIONS
|
* GLOBAL FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
#if USE_LV_RECT != 0
|
||||||
/**
|
/**
|
||||||
* Draw a rectangle
|
* Draw a rectangle
|
||||||
* @param cords_p the coordinates of the rectangle
|
* @param cords_p the coordinates of the rectangle
|
||||||
@@ -100,7 +104,9 @@ void lv_draw_rect(const area_t * cords_p, const area_t * mask_p,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /*USE_LV_RECT != 0*/
|
||||||
|
|
||||||
|
#if USE_LV_LABEL != 0
|
||||||
/**
|
/**
|
||||||
* Write a text
|
* Write a text
|
||||||
* @param cords_p coordinates of the label
|
* @param cords_p coordinates of the label
|
||||||
@@ -158,6 +164,7 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* USE_LV_LABEL != 0*/
|
||||||
|
|
||||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||||
/**
|
/**
|
||||||
@@ -244,8 +251,9 @@ void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /*USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0*/
|
||||||
|
|
||||||
|
#if USE_LV_LINE != 0
|
||||||
/**
|
/**
|
||||||
* Draw a line
|
* Draw a line
|
||||||
* @param p1 first point of the line
|
* @param p1 first point of the line
|
||||||
@@ -373,11 +381,13 @@ void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
|
|||||||
fill_fp(&draw_area, mask_p, lines_p->objs.color, opa);
|
fill_fp(&draw_area, mask_p, lines_p->objs.color, opa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /*USE_LV_LINE != 0*/
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
|
#if USE_LV_RECT != 0
|
||||||
/**
|
/**
|
||||||
* Draw the middle part (rectangular) of a rectangle
|
* Draw the middle part (rectangular) of a rectangle
|
||||||
* @param cords_p the coordinates of the original rectangle
|
* @param cords_p the coordinates of the original rectangle
|
||||||
@@ -865,3 +875,6 @@ static uint16_t lv_draw_rect_radius_corr(uint16_t r, cord_t w, cord_t h)
|
|||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /*USE_LV_RECT != 0*/
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,20 @@
|
|||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
#if USE_LV_RECT != 0
|
||||||
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p,
|
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p,
|
||||||
const lv_rects_t * rects_p, opa_t opa);
|
const lv_rects_t * rects_p, opa_t opa);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_LV_LABEL != 0
|
||||||
void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
|
||||||
const lv_labels_t * labels_p, opa_t opa, const char * txt);
|
const lv_labels_t * labels_p, opa_t opa, const char * txt);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_LV_LINE != 0
|
||||||
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
|
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
|
||||||
const lv_lines_t * lines_p, opa_t opa);
|
const lv_lines_t * lines_p, opa_t opa);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
|
||||||
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
|
||||||
|
|||||||
Reference in New Issue
Block a user