diff options
author | Daniel Garcia <danielgarcia@gmail.com> | 2016-05-22 15:37:23 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2016-05-22 15:37:23 +0300 |
commit | a448d5c3dbbb2183e9782d5b8ad130c35072f900 (patch) | |
tree | c60e6a2a225f0166ceb02e530b9ebb7c3da7f69e | |
parent | 4fda8a054188d854303a293e3cd89c5a796fd109 (diff) |
Try out pragma message vs. warning - still highlights red in the ide
-rw-r--r-- | FastLED.h | 10 | ||||
-rw-r--r-- | fastspi.h | 11 |
2 files changed, 16 insertions, 5 deletions
@@ -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__ @@ -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) |