From 9b7318710025ae85af714bb0b5f390db84ae2cd0 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 30 Jun 2017 19:43:51 +1000 Subject: Add compatibility with Visual Studio and make compile warning capabilities more cross platform --- boards/addons/gdisp/board_SSD1289_stm32f4discovery.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'boards') diff --git a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h b/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h index 33142e83..834cbcac 100644 --- a/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h +++ b/boards/addons/gdisp/board_SSD1289_stm32f4discovery.h @@ -69,7 +69,11 @@ static GFXINLINE void init_board(GDisplay *g) { dmaStreamSetMemory0(GDISP_DMA_STREAM, &GDISP_RAM); dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M); #else - #warning "GDISP: SSD1289 - DMA is supported for F2/F4 Devices. Define GDISP_USE_DMA in your gfxconf.h to turn this on for better performance." + #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT + #warning "GDISP: SSD1289 - DMA is supported for F2/F4 Devices. Define GDISP_USE_DMA in your gfxconf.h to turn this on for better performance." + #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO + COMPILER_WARNING("GDISP: SSD1289 - DMA is supported for F2/F4 Devices. Define GDISP_USE_DMA in your gfxconf.h to turn this on for better performance.") + #endif #endif #else #error "GDISP: SSD1289 - FSMC not implemented for this device" -- cgit v1.2.3