diff options
Diffstat (limited to 'boards')
13 files changed, 64 insertions, 40 deletions
diff --git a/boards/base/ArduinoTinyScreen/ugfx_test.ino b/boards/base/ArduinoTinyScreen/ugfx_test.ino index 25bbcdef..456dd1fc 100644 --- a/boards/base/ArduinoTinyScreen/ugfx_test.ino +++ b/boards/base/ArduinoTinyScreen/ugfx_test.ino @@ -17,12 +17,12 @@ void setup() { height = gdispGetHeight(); // Code Here - gdispDrawBox(10, 10, width / 2, height / 2, Yellow); - gdispFillArea(width / 2, height / 2, width / 2 - 10, height / 2 - 10, Blue); - gdispDrawLine(5, 30, width - 50, height - 40, Red); + gdispDrawBox(10, 10, width / 2, height / 2, GFX_YELLOW); + gdispFillArea(width / 2, height / 2, width / 2 - 10, height / 2 - 10, GFX_BLUE); + gdispDrawLine(5, 30, width - 50, height - 40, GFX_RED); for (i = 5, j = 0; i < width && j < height; i += 7, j += i / 20) - gdispDrawPixel(i, j, White); + gdispDrawPixel(i, j, GFX_WHITE); #endif } diff --git a/boards/base/STM32F439i-Eval/CubeHal/board_STM32LTDC.h b/boards/base/STM32F439i-Eval/CubeHal/board_STM32LTDC.h index 7ddd554f..5b91c2df 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/board_STM32LTDC.h +++ b/boards/base/STM32F439i-Eval/CubeHal/board_STM32LTDC.h @@ -9,9 +9,11 @@ #define _GDISP_LLD_BOARD_H // Avoid naming collisions with CubeHAL -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif // Include CubeHAL #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h b/boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h index 0f07b412..cd558d69 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h +++ b/boards/base/STM32F439i-Eval/CubeHal/gmouse_lld_EXC7200_board.h @@ -15,9 +15,11 @@ #define _GINPUT_LLD_MOUSE_BOARD_H // Avoid naming collisions with CubeHAL -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif // Include CubeHAL #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.c b/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.c index 6e103a5a..65b78a76 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.c +++ b/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.c @@ -78,9 +78,11 @@ ------------------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/ -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm324x9i_eval_sdram.h" /** @addtogroup BSP diff --git a/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.h b/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.h index d9c04044..0f572a03 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.h +++ b/boards/base/STM32F439i-Eval/CubeHal/stm324x9i_eval_sdram.h @@ -40,9 +40,11 @@ #ifndef __STM324x9I_EVAL_SDRAM_H #define __STM324x9I_EVAL_SDRAM_H -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #ifdef __cplusplus extern "C" { diff --git a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_interrupts.c b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_interrupts.c index 194d4e70..71602082 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_interrupts.c +++ b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_interrupts.c @@ -38,9 +38,11 @@ */ /* Includes ------------------------------------------------------------------*/ -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f4xx_hal_conf.h" #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_system.c b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_system.c index 8e33c5ce..63df499b 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_system.c +++ b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_system.c @@ -62,9 +62,11 @@ /** @addtogroup STM32F4xx_System_Private_Includes * @{ */ -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f4xx.h" diff --git a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c index ccfa2854..fd2dbdef 100644 --- a/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c +++ b/boards/base/STM32F439i-Eval/CubeHal/stm32f439i_raw32_ugfx.c @@ -1,8 +1,10 @@ #include "../../../gfx.h" -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F469i-Discovery/CubeHAL/board_STM32LTDC.h b/boards/base/STM32F469i-Discovery/CubeHAL/board_STM32LTDC.h index 87f70603..661038d3 100644 --- a/boards/base/STM32F469i-Discovery/CubeHAL/board_STM32LTDC.h +++ b/boards/base/STM32F469i-Discovery/CubeHAL/board_STM32LTDC.h @@ -9,9 +9,11 @@ #define _GDISP_LLD_BOARD_H /* Avoid naming collisions with CubeHAL. */ -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif /* HAL drivers needed for configuration. */ #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F469i-Discovery/stm32f469i_raw32_ugfx.c b/boards/base/STM32F469i-Discovery/stm32f469i_raw32_ugfx.c index 7619b074..35b7a5e3 100644 --- a/boards/base/STM32F469i-Discovery/stm32f469i_raw32_ugfx.c +++ b/boards/base/STM32F469i-Discovery/stm32f469i_raw32_ugfx.c @@ -1,7 +1,9 @@ #include "../../../gfx.h" -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f4xx.h" #include "stm32f4xx_hal.h" diff --git a/boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c b/boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c index 374f49c5..a973a0b6 100644 --- a/boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c +++ b/boards/base/STM32F746-Discovery/stm32f746g_discovery_sdram.c @@ -1,7 +1,9 @@ #include "../../../gfx.h" -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f746g_discovery_sdram.h" #include "stm32f7xx_hal_rcc.h" #include "stm32f7xx_hal_dma.h" diff --git a/boards/base/STM32F746-Discovery/stm32f746g_raw32_ugfx.c b/boards/base/STM32F746-Discovery/stm32f746g_raw32_ugfx.c index ae002598..f521b865 100644 --- a/boards/base/STM32F746-Discovery/stm32f746g_raw32_ugfx.c +++ b/boards/base/STM32F746-Discovery/stm32f746g_raw32_ugfx.c @@ -1,7 +1,9 @@ #include "../../../gfx.h"
-#undef Red
-#undef Green
-#undef Blue
+#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
+ #undef Red
+ #undef Green
+ #undef Blue
+#endif
#include "stm32f7xx_hal.h"
#if GFX_USE_OS_CHIBIOS
diff --git a/boards/base/STM32F746-Discovery/stm32f7_i2c.c b/boards/base/STM32F746-Discovery/stm32f7_i2c.c index 07a6ce30..90bb9635 100644 --- a/boards/base/STM32F746-Discovery/stm32f7_i2c.c +++ b/boards/base/STM32F746-Discovery/stm32f7_i2c.c @@ -1,7 +1,9 @@ #include "gfx.h" -#undef Red -#undef Green -#undef Blue +#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS + #undef Red + #undef Green + #undef Blue +#endif #include "stm32f7_i2c.h" /* |