The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Kojto
Date:
Thu Aug 03 13:37:00 2017 +0100
Revision:
148:fd96258d940d
Parent:
147:a97add6d7e64
Child:
154:fb8e0ae1cceb
Release 148 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 138:093f2bd7b9eb 1
<> 138:093f2bd7b9eb 2 /** \addtogroup platform */
<> 138:093f2bd7b9eb 3 /** @{*/
<> 138:093f2bd7b9eb 4 /* mbed Microcontroller Library
<> 138:093f2bd7b9eb 5 * Copyright (c) 2006-2013 ARM Limited
<> 138:093f2bd7b9eb 6 *
<> 138:093f2bd7b9eb 7 * Licensed under the Apache License, Version 2.0 (the "License");
<> 138:093f2bd7b9eb 8 * you may not use this file except in compliance with the License.
<> 138:093f2bd7b9eb 9 * You may obtain a copy of the License at
<> 138:093f2bd7b9eb 10 *
<> 138:093f2bd7b9eb 11 * http://www.apache.org/licenses/LICENSE-2.0
<> 138:093f2bd7b9eb 12 *
<> 138:093f2bd7b9eb 13 * Unless required by applicable law or agreed to in writing, software
<> 138:093f2bd7b9eb 14 * distributed under the License is distributed on an "AS IS" BASIS,
<> 138:093f2bd7b9eb 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 138:093f2bd7b9eb 16 * See the License for the specific language governing permissions and
<> 138:093f2bd7b9eb 17 * limitations under the License.
<> 138:093f2bd7b9eb 18 */
<> 138:093f2bd7b9eb 19 #ifndef MBED_TOOLCHAIN_H
<> 138:093f2bd7b9eb 20 #define MBED_TOOLCHAIN_H
<> 138:093f2bd7b9eb 21
<> 138:093f2bd7b9eb 22 #include "mbed_preprocessor.h"
<> 138:093f2bd7b9eb 23
<> 138:093f2bd7b9eb 24
<> 138:093f2bd7b9eb 25 // Warning for unsupported compilers
<> 138:093f2bd7b9eb 26 #if !defined(__GNUC__) /* GCC */ \
<> 138:093f2bd7b9eb 27 && !defined(__CC_ARM) /* ARMCC */ \
<> 138:093f2bd7b9eb 28 && !defined(__clang__) /* LLVM/Clang */ \
<> 138:093f2bd7b9eb 29 && !defined(__ICCARM__) /* IAR */
<> 138:093f2bd7b9eb 30 #warning "This compiler is not yet supported."
<> 138:093f2bd7b9eb 31 #endif
<> 138:093f2bd7b9eb 32
<> 138:093f2bd7b9eb 33
<> 138:093f2bd7b9eb 34 // Attributes
<> 138:093f2bd7b9eb 35
<> 138:093f2bd7b9eb 36 /** MBED_PACKED
<> 138:093f2bd7b9eb 37 * Pack a structure, preventing any padding from being added between fields.
<> 138:093f2bd7b9eb 38 *
<> 138:093f2bd7b9eb 39 * @code
<> 138:093f2bd7b9eb 40 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 41 *
<> 138:093f2bd7b9eb 42 * MBED_PACKED(struct) foo {
<> 138:093f2bd7b9eb 43 * char x;
<> 138:093f2bd7b9eb 44 * int y;
<> 138:093f2bd7b9eb 45 * };
<> 138:093f2bd7b9eb 46 * @endcode
<> 138:093f2bd7b9eb 47 */
<> 138:093f2bd7b9eb 48 #ifndef MBED_PACKED
<> 138:093f2bd7b9eb 49 #if defined(__ICCARM__)
<> 138:093f2bd7b9eb 50 #define MBED_PACKED(struct) __packed struct
<> 138:093f2bd7b9eb 51 #else
<> 138:093f2bd7b9eb 52 #define MBED_PACKED(struct) struct __attribute__((packed))
<> 138:093f2bd7b9eb 53 #endif
<> 138:093f2bd7b9eb 54 #endif
<> 138:093f2bd7b9eb 55
<> 138:093f2bd7b9eb 56 /** MBED_ALIGN(N)
<> 138:093f2bd7b9eb 57 * Declare a variable to be aligned on an N-byte boundary.
<> 138:093f2bd7b9eb 58 *
<> 138:093f2bd7b9eb 59 * @note
<> 138:093f2bd7b9eb 60 * IAR does not support alignment greater than word size on the stack
<> 138:093f2bd7b9eb 61 *
<> 138:093f2bd7b9eb 62 * @code
<> 138:093f2bd7b9eb 63 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 64 *
<> 138:093f2bd7b9eb 65 * MBED_ALIGN(16) char a;
<> 138:093f2bd7b9eb 66 * @endcode
<> 138:093f2bd7b9eb 67 */
<> 138:093f2bd7b9eb 68 #ifndef MBED_ALIGN
<> 138:093f2bd7b9eb 69 #if defined(__ICCARM__)
<> 138:093f2bd7b9eb 70 #define MBED_ALIGN(N) _Pragma(MBED_STRINGIFY(data_alignment=N))
<> 138:093f2bd7b9eb 71 #else
<> 138:093f2bd7b9eb 72 #define MBED_ALIGN(N) __attribute__((aligned(N)))
<> 138:093f2bd7b9eb 73 #endif
<> 138:093f2bd7b9eb 74 #endif
<> 138:093f2bd7b9eb 75
<> 138:093f2bd7b9eb 76 /** MBED_UNUSED
<> 138:093f2bd7b9eb 77 * Declare a function argument to be unused, suppressing compiler warnings
<> 138:093f2bd7b9eb 78 *
<> 138:093f2bd7b9eb 79 * @code
<> 138:093f2bd7b9eb 80 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 81 *
<> 138:093f2bd7b9eb 82 * void foo(MBED_UNUSED int arg) {
<> 138:093f2bd7b9eb 83 *
<> 138:093f2bd7b9eb 84 * }
<> 138:093f2bd7b9eb 85 * @endcode
<> 138:093f2bd7b9eb 86 */
<> 138:093f2bd7b9eb 87 #ifndef MBED_UNUSED
<> 138:093f2bd7b9eb 88 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 89 #define MBED_UNUSED __attribute__((__unused__))
<> 138:093f2bd7b9eb 90 #else
<> 138:093f2bd7b9eb 91 #define MBED_UNUSED
<> 138:093f2bd7b9eb 92 #endif
<> 138:093f2bd7b9eb 93 #endif
<> 138:093f2bd7b9eb 94
<> 138:093f2bd7b9eb 95 /** MBED_WEAK
<> 138:093f2bd7b9eb 96 * Mark a function as being weak.
Kojto 148:fd96258d940d 97 *
Kojto 148:fd96258d940d 98 * @note
Kojto 148:fd96258d940d 99 * Functions should only be marked as weak in the source file. The header file
Kojto 148:fd96258d940d 100 * should contain a regular function declaration to insure the function is emitted.
Kojto 148:fd96258d940d 101 * A function marked weak will not be emitted if an alternative non-weak
Kojto 148:fd96258d940d 102 * implementation is defined.
<> 138:093f2bd7b9eb 103 *
<> 138:093f2bd7b9eb 104 * @note
Kojto 148:fd96258d940d 105 * Weak functions are not friendly to making code re-usable, as they can only
<> 138:093f2bd7b9eb 106 * be overridden once (and if they are multiply overridden the linker will emit
<> 138:093f2bd7b9eb 107 * no warning). You should not normally use weak symbols as part of the API to
<> 138:093f2bd7b9eb 108 * re-usable modules.
<> 138:093f2bd7b9eb 109 *
<> 138:093f2bd7b9eb 110 * @code
<> 138:093f2bd7b9eb 111 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 112 *
<> 138:093f2bd7b9eb 113 * MBED_WEAK void foo() {
<> 138:093f2bd7b9eb 114 * // a weak implementation of foo that can be overriden by a definition
<> 138:093f2bd7b9eb 115 * // without __weak
<> 138:093f2bd7b9eb 116 * }
<> 138:093f2bd7b9eb 117 * @endcode
<> 138:093f2bd7b9eb 118 */
<> 138:093f2bd7b9eb 119 #ifndef MBED_WEAK
<> 138:093f2bd7b9eb 120 #if defined(__ICCARM__)
<> 138:093f2bd7b9eb 121 #define MBED_WEAK __weak
<> 138:093f2bd7b9eb 122 #else
<> 138:093f2bd7b9eb 123 #define MBED_WEAK __attribute__((weak))
<> 138:093f2bd7b9eb 124 #endif
<> 138:093f2bd7b9eb 125 #endif
<> 138:093f2bd7b9eb 126
<> 138:093f2bd7b9eb 127 /** MBED_PURE
<> 138:093f2bd7b9eb 128 * Hint to the compiler that a function depends only on parameters
<> 138:093f2bd7b9eb 129 *
<> 138:093f2bd7b9eb 130 * @code
<> 138:093f2bd7b9eb 131 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 132 *
<> 138:093f2bd7b9eb 133 * MBED_PURE int foo(int arg){
<> 138:093f2bd7b9eb 134 * // no access to global variables
<> 138:093f2bd7b9eb 135 * }
<> 138:093f2bd7b9eb 136 * @endcode
<> 138:093f2bd7b9eb 137 */
<> 138:093f2bd7b9eb 138 #ifndef MBED_PURE
<> 138:093f2bd7b9eb 139 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 140 #define MBED_PURE __attribute__((const))
<> 138:093f2bd7b9eb 141 #else
<> 138:093f2bd7b9eb 142 #define MBED_PURE
<> 138:093f2bd7b9eb 143 #endif
<> 138:093f2bd7b9eb 144 #endif
<> 138:093f2bd7b9eb 145
Kojto 147:a97add6d7e64 146 /** MBED_NOINLINE
Kojto 147:a97add6d7e64 147 * Declare a function that must not be inlined.
Kojto 147:a97add6d7e64 148 *
Kojto 147:a97add6d7e64 149 * @code
Kojto 147:a97add6d7e64 150 * #include "mbed_toolchain.h"
Kojto 147:a97add6d7e64 151 *
Kojto 147:a97add6d7e64 152 * MBED_NOINLINE void foo() {
Kojto 147:a97add6d7e64 153 *
Kojto 147:a97add6d7e64 154 * }
Kojto 147:a97add6d7e64 155 * @endcode
Kojto 147:a97add6d7e64 156 */
Kojto 147:a97add6d7e64 157 #ifndef MBED_NOINLINE
Kojto 147:a97add6d7e64 158 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
Kojto 147:a97add6d7e64 159 #define MBED_NOINLINE __attribute__((noinline))
Kojto 147:a97add6d7e64 160 #elif defined(__ICCARM__)
Kojto 147:a97add6d7e64 161 #define MBED_NOINLINE _Pragma("inline=never")
Kojto 147:a97add6d7e64 162 #else
Kojto 147:a97add6d7e64 163 #define MBED_NOINLINE
Kojto 147:a97add6d7e64 164 #endif
Kojto 147:a97add6d7e64 165 #endif
Kojto 147:a97add6d7e64 166
<> 138:093f2bd7b9eb 167 /** MBED_FORCEINLINE
<> 138:093f2bd7b9eb 168 * Declare a function that must always be inlined. Failure to inline
<> 138:093f2bd7b9eb 169 * such a function will result in an error.
<> 138:093f2bd7b9eb 170 *
<> 138:093f2bd7b9eb 171 * @code
<> 138:093f2bd7b9eb 172 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 173 *
<> 138:093f2bd7b9eb 174 * MBED_FORCEINLINE void foo() {
<> 138:093f2bd7b9eb 175 *
<> 138:093f2bd7b9eb 176 * }
<> 138:093f2bd7b9eb 177 * @endcode
<> 138:093f2bd7b9eb 178 */
<> 138:093f2bd7b9eb 179 #ifndef MBED_FORCEINLINE
<> 138:093f2bd7b9eb 180 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 181 #define MBED_FORCEINLINE static inline __attribute__((always_inline))
<> 138:093f2bd7b9eb 182 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 183 #define MBED_FORCEINLINE _Pragma("inline=forced") static
<> 138:093f2bd7b9eb 184 #else
<> 138:093f2bd7b9eb 185 #define MBED_FORCEINLINE static inline
<> 138:093f2bd7b9eb 186 #endif
<> 138:093f2bd7b9eb 187 #endif
<> 138:093f2bd7b9eb 188
<> 138:093f2bd7b9eb 189 /** MBED_NORETURN
<> 138:093f2bd7b9eb 190 * Declare a function that will never return.
<> 138:093f2bd7b9eb 191 *
<> 138:093f2bd7b9eb 192 * @code
<> 138:093f2bd7b9eb 193 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 194 *
<> 138:093f2bd7b9eb 195 * MBED_NORETURN void foo() {
<> 138:093f2bd7b9eb 196 * // must never return
<> 138:093f2bd7b9eb 197 * while (1) {}
<> 138:093f2bd7b9eb 198 * }
<> 138:093f2bd7b9eb 199 * @endcode
<> 138:093f2bd7b9eb 200 */
<> 138:093f2bd7b9eb 201 #ifndef MBED_NORETURN
<> 138:093f2bd7b9eb 202 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 203 #define MBED_NORETURN __attribute__((noreturn))
<> 138:093f2bd7b9eb 204 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 205 #define MBED_NORETURN __noreturn
<> 138:093f2bd7b9eb 206 #else
<> 138:093f2bd7b9eb 207 #define MBED_NORETURN
<> 138:093f2bd7b9eb 208 #endif
<> 138:093f2bd7b9eb 209 #endif
<> 138:093f2bd7b9eb 210
<> 138:093f2bd7b9eb 211 /** MBED_UNREACHABLE
<> 138:093f2bd7b9eb 212 * An unreachable statement. If the statement is reached,
<> 138:093f2bd7b9eb 213 * behaviour is undefined. Useful in situations where the compiler
<> 138:093f2bd7b9eb 214 * cannot deduce the unreachability of code.
<> 138:093f2bd7b9eb 215 *
<> 138:093f2bd7b9eb 216 * @code
<> 138:093f2bd7b9eb 217 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 218 *
<> 138:093f2bd7b9eb 219 * void foo(int arg) {
<> 138:093f2bd7b9eb 220 * switch (arg) {
<> 138:093f2bd7b9eb 221 * case 1: return 1;
<> 138:093f2bd7b9eb 222 * case 2: return 2;
<> 138:093f2bd7b9eb 223 * ...
<> 138:093f2bd7b9eb 224 * }
<> 138:093f2bd7b9eb 225 * MBED_UNREACHABLE;
<> 138:093f2bd7b9eb 226 * }
<> 138:093f2bd7b9eb 227 * @endcode
<> 138:093f2bd7b9eb 228 */
<> 138:093f2bd7b9eb 229 #ifndef MBED_UNREACHABLE
<> 138:093f2bd7b9eb 230 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__CC_ARM)
<> 138:093f2bd7b9eb 231 #define MBED_UNREACHABLE __builtin_unreachable()
<> 138:093f2bd7b9eb 232 #else
<> 138:093f2bd7b9eb 233 #define MBED_UNREACHABLE while (1)
<> 138:093f2bd7b9eb 234 #endif
<> 138:093f2bd7b9eb 235 #endif
<> 138:093f2bd7b9eb 236
<> 138:093f2bd7b9eb 237 /** MBED_DEPRECATED("message string")
<> 138:093f2bd7b9eb 238 * Mark a function declaration as deprecated, if it used then a warning will be
<> 138:093f2bd7b9eb 239 * issued by the compiler possibly including the provided message. Note that not
<> 138:093f2bd7b9eb 240 * all compilers are able to display the message.
<> 138:093f2bd7b9eb 241 *
<> 138:093f2bd7b9eb 242 * @code
<> 138:093f2bd7b9eb 243 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 244 *
<> 138:093f2bd7b9eb 245 * MBED_DEPRECATED("don't foo any more, bar instead")
<> 138:093f2bd7b9eb 246 * void foo(int arg);
<> 138:093f2bd7b9eb 247 * @endcode
<> 138:093f2bd7b9eb 248 */
<> 138:093f2bd7b9eb 249 #ifndef MBED_DEPRECATED
<> 138:093f2bd7b9eb 250 #if defined(__CC_ARM)
<> 138:093f2bd7b9eb 251 #define MBED_DEPRECATED(M) __attribute__((deprecated))
<> 138:093f2bd7b9eb 252 #elif defined(__GNUC__) || defined(__clang__)
<> 138:093f2bd7b9eb 253 #define MBED_DEPRECATED(M) __attribute__((deprecated(M)))
<> 138:093f2bd7b9eb 254 #else
<> 138:093f2bd7b9eb 255 #define MBED_DEPRECATED(M)
<> 138:093f2bd7b9eb 256 #endif
<> 138:093f2bd7b9eb 257 #endif
<> 138:093f2bd7b9eb 258
<> 138:093f2bd7b9eb 259 /** MBED_DEPRECATED_SINCE("version", "message string")
<> 138:093f2bd7b9eb 260 * Mark a function declaration as deprecated, noting that the declaration was
<> 138:093f2bd7b9eb 261 * deprecated on the specified version. If the function is used then a warning
<> 138:093f2bd7b9eb 262 * will be issued by the compiler possibly including the provided message.
<> 138:093f2bd7b9eb 263 * Note that not all compilers are able to display this message.
<> 138:093f2bd7b9eb 264 *
<> 138:093f2bd7b9eb 265 * @code
<> 138:093f2bd7b9eb 266 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 267 *
<> 138:093f2bd7b9eb 268 * MBED_DEPRECATED_SINCE("mbed-os-5.1", "don't foo any more, bar instead")
<> 138:093f2bd7b9eb 269 * void foo(int arg);
<> 138:093f2bd7b9eb 270 * @endcode
<> 138:093f2bd7b9eb 271 */
<> 138:093f2bd7b9eb 272 #define MBED_DEPRECATED_SINCE(D, M) MBED_DEPRECATED(M " [since " D "]")
<> 138:093f2bd7b9eb 273
<> 138:093f2bd7b9eb 274 /** MBED_CALLER_ADDR()
<> 138:093f2bd7b9eb 275 * Returns the caller of the current function.
<> 138:093f2bd7b9eb 276 *
<> 138:093f2bd7b9eb 277 * @note
<> 138:093f2bd7b9eb 278 * This macro is only implemented for GCC and ARMCC.
<> 138:093f2bd7b9eb 279 *
<> 138:093f2bd7b9eb 280 * @code
<> 138:093f2bd7b9eb 281 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 282 *
<> 138:093f2bd7b9eb 283 * printf("This function was called from %p", MBED_CALLER_ADDR());
<> 138:093f2bd7b9eb 284 * @endcode
<> 138:093f2bd7b9eb 285 *
<> 138:093f2bd7b9eb 286 * @return Address of the calling function
<> 138:093f2bd7b9eb 287 */
<> 138:093f2bd7b9eb 288 #ifndef MBED_CALLER_ADDR
<> 138:093f2bd7b9eb 289 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__CC_ARM)
<> 138:093f2bd7b9eb 290 #define MBED_CALLER_ADDR() __builtin_extract_return_addr(__builtin_return_address(0))
<> 138:093f2bd7b9eb 291 #elif defined(__CC_ARM)
<> 138:093f2bd7b9eb 292 #define MBED_CALLER_ADDR() __builtin_return_address(0)
<> 138:093f2bd7b9eb 293 #else
<> 138:093f2bd7b9eb 294 #define MBED_CALLER_ADDR() (NULL)
<> 138:093f2bd7b9eb 295 #endif
<> 138:093f2bd7b9eb 296 #endif
<> 138:093f2bd7b9eb 297
<> 138:093f2bd7b9eb 298 #ifndef MBED_SECTION
<> 138:093f2bd7b9eb 299 #if (defined(__GNUC__) || defined(__clang__)) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 300 #define MBED_SECTION(name) __attribute__ ((section (name)))
<> 138:093f2bd7b9eb 301 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 302 #define MBED_SECTION(name) _Pragma(MBED_STRINGIFY(location=name))
<> 138:093f2bd7b9eb 303 #else
<> 138:093f2bd7b9eb 304 #error "Missing MBED_SECTION directive"
<> 138:093f2bd7b9eb 305 #endif
<> 138:093f2bd7b9eb 306 #endif
<> 138:093f2bd7b9eb 307
AnnaBridge 145:64910690c574 308 #ifndef MBED_PRINTF
AnnaBridge 145:64910690c574 309 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 310 #define MBED_PRINTF(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx, first_param_idx)))
AnnaBridge 145:64910690c574 311 #else
AnnaBridge 145:64910690c574 312 #define MBED_PRINTF(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 313 #endif
AnnaBridge 145:64910690c574 314 #endif
AnnaBridge 145:64910690c574 315
AnnaBridge 145:64910690c574 316 #ifndef MBED_PRINTF_METHOD
AnnaBridge 145:64910690c574 317 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 318 #define MBED_PRINTF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx+1, first_param_idx+1)))
AnnaBridge 145:64910690c574 319 #else
AnnaBridge 145:64910690c574 320 #define MBED_PRINTF_METHOD(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 321 #endif
AnnaBridge 145:64910690c574 322 #endif
AnnaBridge 145:64910690c574 323
AnnaBridge 145:64910690c574 324 #ifndef MBED_SCANF
AnnaBridge 145:64910690c574 325 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 326 #define MBED_SCANF(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx, first_param_idx)))
AnnaBridge 145:64910690c574 327 #else
AnnaBridge 145:64910690c574 328 #define MBED_SCANF(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 329 #endif
AnnaBridge 145:64910690c574 330 #endif
AnnaBridge 145:64910690c574 331
AnnaBridge 145:64910690c574 332 #ifndef MBED_SCANF_METHOD
AnnaBridge 145:64910690c574 333 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 334 #define MBED_SCANF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx+1, first_param_idx+1)))
AnnaBridge 145:64910690c574 335 #else
AnnaBridge 145:64910690c574 336 #define MBED_SCANF_METHOD(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 337 #endif
AnnaBridge 145:64910690c574 338 #endif
AnnaBridge 145:64910690c574 339
<> 138:093f2bd7b9eb 340 // FILEHANDLE declaration
<> 138:093f2bd7b9eb 341 #if defined(TOOLCHAIN_ARM)
<> 138:093f2bd7b9eb 342 #include <rt_sys.h>
<> 138:093f2bd7b9eb 343 #endif
<> 138:093f2bd7b9eb 344
<> 138:093f2bd7b9eb 345 #ifndef FILEHANDLE
<> 138:093f2bd7b9eb 346 typedef int FILEHANDLE;
<> 138:093f2bd7b9eb 347 #endif
<> 138:093f2bd7b9eb 348
<> 138:093f2bd7b9eb 349 // Backwards compatibility
<> 138:093f2bd7b9eb 350 #ifndef WEAK
<> 138:093f2bd7b9eb 351 #define WEAK MBED_WEAK
<> 138:093f2bd7b9eb 352 #endif
<> 138:093f2bd7b9eb 353
<> 138:093f2bd7b9eb 354 #ifndef PACKED
<> 138:093f2bd7b9eb 355 #define PACKED MBED_PACKED()
<> 138:093f2bd7b9eb 356 #endif
<> 138:093f2bd7b9eb 357
<> 138:093f2bd7b9eb 358 #ifndef EXTERN
<> 138:093f2bd7b9eb 359 #define EXTERN extern
<> 138:093f2bd7b9eb 360 #endif
<> 138:093f2bd7b9eb 361
<> 138:093f2bd7b9eb 362 #endif
<> 138:093f2bd7b9eb 363
<> 138:093f2bd7b9eb 364 /** @}*/