From ee795362ba36c2143715a61e1d1fa91aea830a11 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Dec 2017 03:13:23 +0100 Subject: [PATCH 01/19] Update TODO_MAJOR.md --- docs/TODO_MAJOR.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/TODO_MAJOR.md b/docs/TODO_MAJOR.md index aacfa628e..41c42d1a3 100644 --- a/docs/TODO_MAJOR.md +++ b/docs/TODO_MAJOR.md @@ -6,11 +6,10 @@ Please create an issue to suggest a new feature instead of adding pull request t ## v5 **Architectural changes** -- [ ] Rename repository from *lvgl* to *littlevgl* -- [ ] Rename repository from *proj_pc* to *pc_simulator* +- [x] Rename repository from *proj_pc* to *pc_simulator* - [x] Integrate *hal* in LittlevGL as a normal folder - [x] Create a new repository for examples -- [ ] Convert Applications into simple examples +- [x] Convert Applications into simple examples - [x] Add tests for all object types **API changes** From b0d84a4a3daf7b7ddcc1eafb70141aed20e65f56 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Dec 2017 03:14:02 +0100 Subject: [PATCH 02/19] Update TODO_MAJOR.md --- docs/TODO_MAJOR.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TODO_MAJOR.md b/docs/TODO_MAJOR.md index 41c42d1a3..8d75a2f6d 100644 --- a/docs/TODO_MAJOR.md +++ b/docs/TODO_MAJOR.md @@ -4,7 +4,7 @@ Major versions released typically when API changes are required ## Contributing Please create an issue to suggest a new feature instead of adding pull request to this file. -## v5 +## v5 (released at: 20.12.2017) **Architectural changes** - [x] Rename repository from *proj_pc* to *pc_simulator* - [x] Integrate *hal* in LittlevGL as a normal folder From e7356bfbb6b6f1b7f12f97f4fcbbbe05c3d60f63 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Dec 2017 03:14:42 +0100 Subject: [PATCH 03/19] Update TODO_MINOR.md --- docs/TODO_MINOR.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TODO_MINOR.md b/docs/TODO_MINOR.md index 0da8a2bf8..61ccf2437 100644 --- a/docs/TODO_MINOR.md +++ b/docs/TODO_MINOR.md @@ -15,7 +15,7 @@ Here are ideas which are not assigned to a minor version yet: - anim. paths: monentum (tnh(x)), curve (exp), shake - hover, hover_lost signals -## v5.0 (in progress) +## v5.0 (released at: 20.12.2017) - [x] UTF-8 support - [x] lv_tabview: new object type to organise content with tabs - [x] lv_sw: new object type, switch, turn on/off by tap (a little slider) From 90ee83fb3e077a24f48545df6f9bc16fb0f7a2cb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Dec 2017 17:08:03 +0100 Subject: [PATCH 04/19] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3810fd673..4edec7aa3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![LittlevGL cover](http://www.gl.littlev.hu/home/main_cover_small.png) -Littlev Graphics Library provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint. +LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint. Homepage: http://gl.littlev.hu @@ -21,7 +21,7 @@ Homepage: http://gl.littlev.hu - Multi language support with UTF-8 support - Fully customizable graphical elements -- Hardware independent to use with any MCU or display +- Hardware independent to use with any microcontroller or display - Scalable to operate with few memory (80 kB Flash, 10 kB RAM) - OS, External memory and GPU supported but not required - Single frame buffer operation even with advances graphical effects From 85bb30a19d31bed96ad3d075aaea8a1a203b5d7d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Dec 2017 17:08:17 +0100 Subject: [PATCH 05/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4edec7aa3..781e3c20c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint. -Homepage: http://gl.littlev.hu +Homepage: http://www.gl.littlev.hu ### Table Of Content * [Key features](#key-features) From 33f2d2fbd87bac1535b251d4ccd9a1ccc9123d4a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Dec 2017 17:09:44 +0100 Subject: [PATCH 06/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 781e3c20c..f4e947e8e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ In the most sime case you need 4 things: 3. Register a function which can **read an input device**. (E.g. touch pad) 4. Call `lv_task_handler()` periodically in every few milliseconds () -For more information visit http://gl.littlev.hu/porting +For more information visit http://www.gl.littlev.hu/porting ## Project set-up 1. **Clone** or download the lvgl repository: `git clone https://github.com/littlevgl/lvgl.git` From 3582f6501ac009dc27601d419c4e50f31406c708 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Dec 2017 11:00:46 +0100 Subject: [PATCH 07/19] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index f4e947e8e..a00293ac3 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Homepage: http://www.gl.littlev.hu * [Porting](#porting) * [Project set-up](#project-set-up) * [PC simulator](#pc-simulator) +* [Screenshots](#screenshots) * [Contributing](#contributing) * [Donate](#donate) @@ -60,6 +61,12 @@ If you don't have got an embedded hardware you can test the graphics library in There is a pre-configured PC project for **Eclipse CDT** in this repository: https://github.com/littlevgl/pc_simulator +## Screenshots +![TFT material](http://www.gl.littlev.hu/github_res/tft_material.png) +![TFT zen](http://www.gl.littlev.hu/github_res/tft_zen.png) +![TFT alien](http://www.gl.littlev.hu/github_res/tft_alien.png) +![TFT night](http://www.gl.littlev.hu/github_res/tft_night.png) + ## Contributing See [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md) From 866e9e73b1f80f48a453119d96590a9d181a03ee Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Dec 2017 11:03:16 +0100 Subject: [PATCH 08/19] Update README.md --- README.md | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a00293ac3..cf27dfb97 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,21 @@ Homepage: http://www.gl.littlev.hu * [Donate](#donate) ## Key features -- Powerful building blocks buttons, charts, lists, sliders, images etc -- Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling -- Various input devices touch pad, mouse, keyboard and external buttons -- Multi language support with UTF-8 support -- Fully customizable graphical elements - -- Hardware independent to use with any microcontroller or display -- Scalable to operate with few memory (80 kB Flash, 10 kB RAM) -- OS, External memory and GPU supported but not required -- Single frame buffer operation even with advances graphical effects - -- Written in C for maximal compatibility -- PC simulator to develop without embedded hardware -- Tutorials, examples, themes for rapid development -- Advanced support and professional GUI development service -- Documentation and API references online -- Free and open source under MIT licence +* Powerful building blocks buttons, charts, lists, sliders, images etc +* Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling +* Various input devices touch pad, mouse, keyboard and external buttons +* Multi language support with UTF-8 support +* Fully customizable graphical elements +* Hardware independent to use with any microcontroller or display +* Scalable to operate with few memory (80 kB Flash, 10 kB RAM) +* OS, External memory and GPU supported but not required +* Single frame buffer operation even with advances graphical effects +* Written in C for maximal compatibility +* PC simulator to develop without embedded hardware +* Tutorials, examples, themes for rapid development +* Advanced support and professional GUI development service +* Documentation and API references online +* Free and open source under MIT licence ## Porting In the most sime case you need 4 things: From 4a58c778e4ec7fdfa9c4035e091da548a5e3b5b3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Dec 2017 11:04:09 +0100 Subject: [PATCH 09/19] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf27dfb97..40d957cb6 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ Homepage: http://www.gl.littlev.hu * [Donate](#donate) ## Key features -* Powerful building blocks buttons, charts, lists, sliders, images etc +* Powerful building: blocks buttons, charts, lists, sliders, images etc * Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling -* Various input devices touch pad, mouse, keyboard and external buttons -* Multi language support with UTF-8 support +* Various input: devices touch pad, mouse, keyboard and external buttons +* Multi language support with UTF-8 decoding * Fully customizable graphical elements * Hardware independent to use with any microcontroller or display * Scalable to operate with few memory (80 kB Flash, 10 kB RAM) From 337d533dd53c74a6628c9b9990e7932638624742 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 31 Dec 2017 23:17:28 +0100 Subject: [PATCH 10/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40d957cb6..6080d369d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint. -Homepage: http://www.gl.littlev.hu +Homepage: https://littlevgl.com ### Table Of Content * [Key features](#key-features) From cc37769c9197d25beb74b4e779adde5adb35216b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 31 Dec 2017 23:28:28 +0100 Subject: [PATCH 11/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6080d369d..bd891f79b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ In the most sime case you need 4 things: 3. Register a function which can **read an input device**. (E.g. touch pad) 4. Call `lv_task_handler()` periodically in every few milliseconds () -For more information visit http://www.gl.littlev.hu/porting +For more information visit https://littlevgl.com/porting ## Project set-up 1. **Clone** or download the lvgl repository: `git clone https://github.com/littlevgl/lvgl.git` From e1f4426f761a14d2a7655e4bdbda72c7d8ef387d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 31 Dec 2017 23:31:10 +0100 Subject: [PATCH 12/19] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bd891f79b..29c87a61b 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ Homepage: https://littlevgl.com * [Donate](#donate) ## Key features -* Powerful building: blocks buttons, charts, lists, sliders, images etc +* Powerful building blocks buttons, charts, lists, sliders, images etc * Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling -* Various input: devices touch pad, mouse, keyboard and external buttons +* Various input devices touch pad, mouse, keyboard, encoder etc * Multi language support with UTF-8 decoding * Fully customizable graphical elements * Hardware independent to use with any microcontroller or display @@ -26,11 +26,11 @@ Homepage: https://littlevgl.com * OS, External memory and GPU supported but not required * Single frame buffer operation even with advances graphical effects * Written in C for maximal compatibility -* PC simulator to develop without embedded hardware +* Simulator to develop on PC without embedded hardware * Tutorials, examples, themes for rapid development * Advanced support and professional GUI development service * Documentation and API references online -* Free and open source under MIT licence +* Free and open-source under MIT licence ## Porting In the most sime case you need 4 things: @@ -69,7 +69,7 @@ There is a pre-configured PC project for **Eclipse CDT** in this repository: htt See [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md) ## Donate -If you are pleased with the graphics library and found it useful please support its further development: +If you are pleased with the graphics library, found it useful or be happy with the support you got, please help its further development: [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GJV3SC5EHDANS) From 4aa3927b5522de6421916f3d5b03e30d06f6c71d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Dec 2017 15:37:06 +0100 Subject: [PATCH 13/19] btnm: bottom border fix --- lv_objx/lv_btnm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 6ade661ba..a7e3d5258 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -227,7 +227,7 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) /*If no vertical padding then make sure the last row is at the bottom of 'btnm'*/ if(style_bg->body.padding.ver == 0 && act_y + btn_h * 2 > max_h) { /*Last row?*/ - btn_h = max_h - act_y; + btn_h = max_h - act_y - 1; } if(strlen(map_p_tmp[btn_cnt]) == 0) break; /*Break on end of map*/ From 96692bfc3bd3cf07dca5176603d935dfd01633b1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Dec 2017 15:37:24 +0100 Subject: [PATCH 14/19] material_theme: darker bg --- lv_themes/lv_theme_material.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 65f860c76..202eb0535 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -14,7 +14,7 @@ /********************* * DEFINES *********************/ -#define DEF_RADIUS 3 +#define DEF_RADIUS 4 #define DEF_SHADOW_COLOR LV_COLOR_HEX3(0x888) /********************** @@ -50,14 +50,16 @@ static void basic_init(void) { lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ def.text.font = _font; + def.body.radius = DEF_RADIUS; static lv_style_t bg, panel; lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_HEX(0xf8f8f8); + bg.body.main_color = LV_COLOR_HEX(0xf0f0f0); bg.body.grad_color = bg.body.main_color; + bg.body.radius = 0; lv_style_copy(&panel, &def); - panel.body.radius = 3; + panel.body.radius = DEF_RADIUS; panel.body.main_color = LV_COLOR_WHITE; panel.body.grad_color = LV_COLOR_WHITE; panel.body.border.width = 1; From 1c34777024df351645835b23630fd2880445b0bc Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 2 Jan 2018 12:59:18 +0100 Subject: [PATCH 15/19] line width bugfox width anti-aliasing --- lv_draw/lv_draw.c | 1 + lv_themes/lv_theme_alien.c | 2 +- lv_themes/lv_theme_default.c | 2 +- lv_themes/lv_theme_night.c | 4 ++-- lv_themes/lv_theme_zen.c | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index a59b9e1c2..55d9cbbd0 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -574,6 +574,7 @@ void lv_draw_line(const lv_point_t * p1, const lv_point_t * p2, const lv_area_t /*Make the correction on lie width*/ width = ((style->line.width - 1) * width_corr_array[wcor]) >> LINE_WIDTH_CORR_SHIFT; + width = width << LV_ANTIALIAS; width_half = width >> 1; width_1 = width & 0x1 ? 1 : 0; diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index b8b9957ed..5f09e1810 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -371,7 +371,7 @@ static void gauge_init(void) gauge_bg.body.padding.inner = LV_DPI / 8; /*Label - scale distance*/ gauge_bg.body.border.color = LV_COLOR_HEX3(0x777); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); - gauge_bg.line.width = 3; + gauge_bg.line.width = 2; gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); gauge_bg.text.font = _font; diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index c0e00c82e..bbdc86135 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -191,7 +191,7 @@ static void gauge_init(void) static lv_style_t gauge; lv_style_copy(&gauge, &lmeter); gauge.line.color = lmeter.body.grad_color; - gauge.line.width = 3; + gauge.line.width = 2; gauge.body.main_color = LV_COLOR_HEX3(0x888); gauge.body.grad_color = lmeter.body.main_color; gauge.text.color = LV_COLOR_HEX3(0x888); diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 1d374fb02..c954a74f0 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -256,7 +256,7 @@ static void lmeter_init(void) lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ lmeter_bg.body.border.color = LV_COLOR_HEX3(0x333); lmeter_bg.line.color = LV_COLOR_HEX3(0x555); - lmeter_bg.line.width = 2 << LV_ANTIALIAS; + lmeter_bg.line.width = 2; lmeter_bg.text.color = LV_COLOR_HEX3(0xddd); theme.lmeter = &lmeter_bg; @@ -271,7 +271,7 @@ static void gauge_init(void) gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); gauge_bg.body.grad_color = gauge_bg.body.main_color; gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); - gauge_bg.line.width = 3; + gauge_bg.line.width = 2; gauge_bg.text.color = LV_COLOR_HEX3(0xddd); theme.gauge = &gauge_bg; diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 51f970851..d66d800aa 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -267,7 +267,7 @@ static void lmeter_init(void) lv_style_copy(&lmeter, &def); lmeter.line.color = LV_COLOR_HEX3(0xddd); - lmeter.line.width = 3; + lmeter.line.width = 2; lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); lmeter.body.grad_color = lmeter.body.main_color; lmeter.body.padding.hor = LV_DPI / 8; @@ -283,10 +283,10 @@ static void gauge_init(void) lv_style_copy(&gauge, &def); gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70); - gauge.line.width = 3; + gauge.line.width = 2; gauge.body.main_color = LV_COLOR_HEX3(0x999); gauge.body.grad_color = gauge.body.main_color; - gauge.body.padding.hor = LV_DPI / 6; + gauge.body.padding.hor = LV_DPI / 12; gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/ theme.gauge = &gauge; From 89044a86491842189321f1823d7953cfdc1ea66b Mon Sep 17 00:00:00 2001 From: Zaltora Date: Sun, 14 Jan 2018 10:23:16 +0100 Subject: [PATCH 16/19] Add specific otion for tick function + inline it --- lv_conf_templ.h | 9 +++++++++ lv_hal/lv_hal_tick.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index e978b35db..7da177ca6 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -8,6 +8,15 @@ #ifndef LV_CONF_H #define LV_CONF_H +/*---------------- + * Compiler attribute + *----------------*/ +/* + * Some Architecture can be customized, like put function or variable + * to a specific memory segment. + */ +#define LV_TICK_ATTRIBUTE /* Define a custom attribute to Tick function */ + /*---------------- * Dynamic memory *----------------*/ diff --git a/lv_hal/lv_hal_tick.c b/lv_hal/lv_hal_tick.c index 44576f31d..ee4a2a4b4 100644 --- a/lv_hal/lv_hal_tick.c +++ b/lv_hal/lv_hal_tick.c @@ -8,6 +8,7 @@ *********************/ #include "lv_hal_tick.h" #include +#include "../../lv_conf.h" /********************* * DEFINES @@ -39,7 +40,7 @@ static volatile uint8_t tick_irq_flag; * You have to call this function periodically * @param tick_period the call period of this function in milliseconds */ -void lv_tick_inc(uint32_t tick_period) +inline void LV_TICK_ATTRIBUTE lv_tick_inc(uint32_t tick_period) { tick_irq_flag = 0; sys_time += tick_period; From 6bab1d284052dbbe76adea4f1b902efab9424bde Mon Sep 17 00:00:00 2001 From: Zaltora Date: Mon, 15 Jan 2018 11:03:50 +0100 Subject: [PATCH 17/19] add handle fn to attribute + reorganize --- lv_conf_templ.h | 13 ++++--------- lv_hal/lv_hal_tick.c | 2 +- lv_misc/lv_task.c | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 7da177ca6..69fbb4e10 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -8,15 +8,6 @@ #ifndef LV_CONF_H #define LV_CONF_H -/*---------------- - * Compiler attribute - *----------------*/ -/* - * Some Architecture can be customized, like put function or variable - * to a specific memory segment. - */ -#define LV_TICK_ATTRIBUTE /* Define a custom attribute to Tick function */ - /*---------------- * Dynamic memory *----------------*/ @@ -99,6 +90,10 @@ #define USE_LV_GPU 1 /*1: Enable GPU interface*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (required by images*/ +/*Compiler attributes*/ +#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to tick increment function */ +#define LV_ATTRIBUTE_TASK_HANDLE /* Define a custom attribute to task handle function */ + /*================ * THEME USAGE *================*/ diff --git a/lv_hal/lv_hal_tick.c b/lv_hal/lv_hal_tick.c index ee4a2a4b4..9e12e3f03 100644 --- a/lv_hal/lv_hal_tick.c +++ b/lv_hal/lv_hal_tick.c @@ -40,7 +40,7 @@ static volatile uint8_t tick_irq_flag; * You have to call this function periodically * @param tick_period the call period of this function in milliseconds */ -inline void LV_TICK_ATTRIBUTE lv_tick_inc(uint32_t tick_period) +inline void LV_ATTRIBUTE_TICK_INC lv_tick_inc(uint32_t tick_period) { tick_irq_flag = 0; sys_time += tick_period; diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index 927ab712b..77ef60d82 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -54,7 +54,7 @@ void lv_task_init(void) /** * Call it periodically to handle lv_tasks. */ -void lv_task_handler(void) +inline void LV_ATTRIBUTE_TASK_HANDLE lv_task_handler(void) { static uint32_t idle_period_start = 0; static uint32_t handler_start = 0; From 6c06bfbf4130937645d9cacf534e37bdb6b205c9 Mon Sep 17 00:00:00 2001 From: Zaltora Date: Mon, 15 Jan 2018 11:07:33 +0100 Subject: [PATCH 18/19] miss include fix --- lv_misc/lv_task.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index 77ef60d82..846a43156 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -10,6 +10,7 @@ #include #include "lv_task.h" #include "../lv_hal/lv_hal_tick.h" +#include "../../lv_conf.h" /********************* * DEFINES From 0fe5a3ba5ecc4df076ac40bb8e0fde6fce687063 Mon Sep 17 00:00:00 2001 From: Zaltora Date: Mon, 15 Jan 2018 11:13:16 +0100 Subject: [PATCH 19/19] fix typo --- lv_conf_templ.h | 2 +- lv_misc/lv_task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 69fbb4e10..bbd8d5f72 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -92,7 +92,7 @@ /*Compiler attributes*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to tick increment function */ -#define LV_ATTRIBUTE_TASK_HANDLE /* Define a custom attribute to task handle function */ +#define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to task handler function */ /*================ * THEME USAGE diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index 846a43156..f5988b686 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -55,7 +55,7 @@ void lv_task_init(void) /** * Call it periodically to handle lv_tasks. */ -inline void LV_ATTRIBUTE_TASK_HANDLE lv_task_handler(void) +inline void LV_ATTRIBUTE_TASK_HANDLER lv_task_handler(void) { static uint32_t idle_period_start = 0; static uint32_t handler_start = 0;