From 4bf7cf4346d3aa3b64f1b0e15a5ffa773523f23f Mon Sep 17 00:00:00 2001 From: Ben Mathews Date: Sat, 2 May 2020 14:56:06 -0600 Subject: [PATCH 1/4] Fixing build issue with include path not including path to driver --- stm32l476-ili9341-example/.cproject | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stm32l476-ili9341-example/.cproject b/stm32l476-ili9341-example/.cproject index 1d6b268..e895cde 100644 --- a/stm32l476-ili9341-example/.cproject +++ b/stm32l476-ili9341-example/.cproject @@ -97,6 +97,8 @@ + + From b32a4337981878e5140e9e0de1d86d27bf0344f3 Mon Sep 17 00:00:00 2001 From: Ben Mathews Date: Sat, 2 May 2020 20:17:00 -0600 Subject: [PATCH 2/4] Suppress drawing if height or width is 0 --- Src/ILI9341_STM32_Driver.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Src/ILI9341_STM32_Driver.c b/Src/ILI9341_STM32_Driver.c index 09d24ce..e6a7080 100644 --- a/Src/ILI9341_STM32_Driver.c +++ b/Src/ILI9341_STM32_Driver.c @@ -455,8 +455,11 @@ if((X+Width-1)>=LCD_WIDTH) { Width=LCD_WIDTH-X; } -ILI9341_Set_Address(X, Y, X+Width-1, Y); -ILI9341_Draw_Colour_Burst(Colour, Width); +if (Width > 0) + { + ILI9341_Set_Address(X, Y, X+Width-1, Y); + ILI9341_Draw_Colour_Burst(Colour, Width); + } } //DRAW LINE FROM X,Y LOCATION to X,Y+Height LOCATION @@ -467,7 +470,10 @@ if((Y+Height-1)>=LCD_HEIGHT) { Height=LCD_HEIGHT-Y; } -ILI9341_Set_Address(X, Y, X, Y+Height-1); -ILI9341_Draw_Colour_Burst(Colour, Height); +if (Height > 0) + { + ILI9341_Set_Address(X, Y, X, Y+Height-1); + ILI9341_Draw_Colour_Burst(Colour, Height); + } } From b7bea1eb594919bdae354e8b1c247ba01e4b5dec Mon Sep 17 00:00:00 2001 From: Ben Mathews Date: Sat, 2 May 2020 20:20:53 -0600 Subject: [PATCH 3/4] Suppress drawing if height or width is 0 --- Src/ILI9341_STM32_Driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Src/ILI9341_STM32_Driver.c b/Src/ILI9341_STM32_Driver.c index e6a7080..7c58110 100644 --- a/Src/ILI9341_STM32_Driver.c +++ b/Src/ILI9341_STM32_Driver.c @@ -443,8 +443,11 @@ if((Y+Height-1)>=LCD_HEIGHT) { Height=LCD_HEIGHT-Y; } -ILI9341_Set_Address(X, Y, X+Width-1, Y+Height-1); -ILI9341_Draw_Colour_Burst(Colour, Height*Width); +if ((Height > 0) && (Width > 0)) + { + ILI9341_Set_Address(X, Y, X+Width-1, Y+Height-1); + ILI9341_Draw_Colour_Burst(Colour, Height*Width); + } } //DRAW LINE FROM X,Y LOCATION to X+Width,Y LOCATION From a0de7c6ef26f208319eef81b42cc452844584768 Mon Sep 17 00:00:00 2001 From: Ben Mathews Date: Sat, 2 May 2020 20:21:23 -0600 Subject: [PATCH 4/4] Removing unnecessary import that causes issues with newer versions of HAL --- Src/ILI9341_GFX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/ILI9341_GFX.c b/Src/ILI9341_GFX.c index 441d818..b2dc2ba 100644 --- a/Src/ILI9341_GFX.c +++ b/Src/ILI9341_GFX.c @@ -48,7 +48,7 @@ #include "ILI9341_GFX.h" #include #include "5x5_font.h" -#include "spi.h" +//#include "spi.h" /*Draw hollow circle at X,Y location with specified radius and colour. X and Y represent circles center */ void ILI9341_Draw_Hollow_Circle(uint16_t X, uint16_t Y, uint16_t Radius, uint16_t Colour) {