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.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
Diff: platform/mbed_toolchain.h
- Revision:
- 145:64910690c574
- Parent:
- 138:093f2bd7b9eb
- Child:
- 147:a97add6d7e64
--- a/platform/mbed_toolchain.h Thu Jun 08 14:53:05 2017 +0100 +++ b/platform/mbed_toolchain.h Wed Jun 21 17:31:38 2017 +0100 @@ -278,6 +278,38 @@ #endif #endif +#ifndef MBED_PRINTF +#if defined(__GNUC__) || defined(__CC_ARM) +#define MBED_PRINTF(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx, first_param_idx))) +#else +#define MBED_PRINTF(format_idx, first_param_idx) +#endif +#endif + +#ifndef MBED_PRINTF_METHOD +#if defined(__GNUC__) || defined(__CC_ARM) +#define MBED_PRINTF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx+1, first_param_idx+1))) +#else +#define MBED_PRINTF_METHOD(format_idx, first_param_idx) +#endif +#endif + +#ifndef MBED_SCANF +#if defined(__GNUC__) || defined(__CC_ARM) +#define MBED_SCANF(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx, first_param_idx))) +#else +#define MBED_SCANF(format_idx, first_param_idx) +#endif +#endif + +#ifndef MBED_SCANF_METHOD +#if defined(__GNUC__) || defined(__CC_ARM) +#define MBED_SCANF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx+1, first_param_idx+1))) +#else +#define MBED_SCANF_METHOD(format_idx, first_param_idx) +#endif +#endif + // FILEHANDLE declaration #if defined(TOOLCHAIN_ARM) #include <rt_sys.h>