Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: utility/logging.h
- 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