cassyarduino cassyarduino / UIPEthernet
Revision:
21:c4439c50a5af
Parent:
20:fe5026169ec6
Child:
23:888d27c409df
--- a/utility/logging.h	Sat Jan 14 19:51:58 2017 +0100
+++ b/utility/logging.h	Sat Jan 14 21:12:09 2017 +0100
@@ -54,11 +54,16 @@
    #endif
 #endif
 
-#if defined(__MBED__) || defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(__STM32F4__)
-   #define F(x) (const char *)(x)
-   #define FP(x) (const char *)(x)
-#else
-   #define FP(x)     (__FlashStringHelper*)(x)         // Helper
+#if defined(ARDUINO)
+  #if defined(STM32_MCU_SERIES) || defined(__STM32F1__) || defined(__STM32F3__) || defined(__STM32F4__)
+    #define F(x) (const char *)(x)
+    #define FP(x) (const char *)(x)
+  #else
+    #define FP(x)     (__FlashStringHelper*)(x)         // Helper
+  #endif
+#endif
+#if defined(__MBED__)
+  #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
 #endif
 
 #endif