Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2016-05-22 15:37:23 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2016-05-22 15:37:23 +0300
commita448d5c3dbbb2183e9782d5b8ad130c35072f900 (patch)
treec60e6a2a225f0166ceb02e530b9ebb7c3da7f69e
parent4fda8a054188d854303a293e3cd89c5a796fd109 (diff)
Try out pragma message vs. warning - still highlights red in the ide
-rw-r--r--FastLED.h10
-rw-r--r--fastspi.h11
2 files changed, 16 insertions, 5 deletions
diff --git a/FastLED.h b/FastLED.h
index d7127765..516a1b73 100644
--- a/FastLED.h
+++ b/FastLED.h
@@ -7,9 +7,17 @@
#define xstr(s) str(s)
#define str(s) #s
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+#define FASTLED_HAS_PRAGMA_MESSAGE
+#endif
+
#define FASTLED_VERSION 3001001
#ifndef FASTLED_INTERNAL
-#warning FastLED version 3.001.001 (Not really a warning, just telling you here.)
+# ifdef FASTLED_HAS_PRAGMA_MESSAGE
+# pragma message "FastLED version 3.001.001"
+# else
+# warning FastLED version 3.001.001 (Not really a warning, just telling you here.)
+# endif
#endif
#ifndef __PROG_TYPES_COMPAT__
diff --git a/fastspi.h b/fastspi.h
index e66ed657..f720b477 100644
--- a/fastspi.h
+++ b/fastspi.h
@@ -105,10 +105,13 @@ class SPIOutput<SPI_UART1_DATA, SPI_UART1_CLOCK, SPI_SPEED> : public AVRUSART1SP
#endif
#else
-
-#if !defined(FASTLED_INTERNAL)
-#warning "No hardware SPI pins defined. All SPI access will default to bitbanged output"
-#endif
+# if !defined(FASTLED_INTERNAL)
+# ifdef FASTLED_HAS_PRAGMA_MESSAGE
+# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
+# else
+# warning "No hardware SPI pins defined. All SPI access will default to bitbanged output"
+# endif
+# endif
#endif
// #if defined(USART_DATA) && defined(USART_CLOCK)