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:
Wed Jul 19 16:46:19 2017 +0100
Revision:
147:a97add6d7e64
Parent:
145:64910690c574
Child:
148:fd96258d940d
Release 147 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.
<> 138:093f2bd7b9eb 97 *
<> 138:093f2bd7b9eb 98 * @note
<> 138:093f2bd7b9eb 99 * weak functions are not friendly to making code re-usable, as they can only
<> 138:093f2bd7b9eb 100 * be overridden once (and if they are multiply overridden the linker will emit
<> 138:093f2bd7b9eb 101 * no warning). You should not normally use weak symbols as part of the API to
<> 138:093f2bd7b9eb 102 * re-usable modules.
<> 138:093f2bd7b9eb 103 *
<> 138:093f2bd7b9eb 104 * @code
<> 138:093f2bd7b9eb 105 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 106 *
<> 138:093f2bd7b9eb 107 * MBED_WEAK void foo() {
<> 138:093f2bd7b9eb 108 * // a weak implementation of foo that can be overriden by a definition
<> 138:093f2bd7b9eb 109 * // without __weak
<> 138:093f2bd7b9eb 110 * }
<> 138:093f2bd7b9eb 111 * @endcode
<> 138:093f2bd7b9eb 112 */
<> 138:093f2bd7b9eb 113 #ifndef MBED_WEAK
<> 138:093f2bd7b9eb 114 #if defined(__ICCARM__)
<> 138:093f2bd7b9eb 115 #define MBED_WEAK __weak
<> 138:093f2bd7b9eb 116 #else
<> 138:093f2bd7b9eb 117 #define MBED_WEAK __attribute__((weak))
<> 138:093f2bd7b9eb 118 #endif
<> 138:093f2bd7b9eb 119 #endif
<> 138:093f2bd7b9eb 120
<> 138:093f2bd7b9eb 121 /** MBED_PURE
<> 138:093f2bd7b9eb 122 * Hint to the compiler that a function depends only on parameters
<> 138:093f2bd7b9eb 123 *
<> 138:093f2bd7b9eb 124 * @code
<> 138:093f2bd7b9eb 125 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 126 *
<> 138:093f2bd7b9eb 127 * MBED_PURE int foo(int arg){
<> 138:093f2bd7b9eb 128 * // no access to global variables
<> 138:093f2bd7b9eb 129 * }
<> 138:093f2bd7b9eb 130 * @endcode
<> 138:093f2bd7b9eb 131 */
<> 138:093f2bd7b9eb 132 #ifndef MBED_PURE
<> 138:093f2bd7b9eb 133 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 134 #define MBED_PURE __attribute__((const))
<> 138:093f2bd7b9eb 135 #else
<> 138:093f2bd7b9eb 136 #define MBED_PURE
<> 138:093f2bd7b9eb 137 #endif
<> 138:093f2bd7b9eb 138 #endif
<> 138:093f2bd7b9eb 139
Kojto 147:a97add6d7e64 140 /** MBED_NOINLINE
Kojto 147:a97add6d7e64 141 * Declare a function that must not be inlined.
Kojto 147:a97add6d7e64 142 *
Kojto 147:a97add6d7e64 143 * @code
Kojto 147:a97add6d7e64 144 * #include "mbed_toolchain.h"
Kojto 147:a97add6d7e64 145 *
Kojto 147:a97add6d7e64 146 * MBED_NOINLINE void foo() {
Kojto 147:a97add6d7e64 147 *
Kojto 147:a97add6d7e64 148 * }
Kojto 147:a97add6d7e64 149 * @endcode
Kojto 147:a97add6d7e64 150 */
Kojto 147:a97add6d7e64 151 #ifndef MBED_NOINLINE
Kojto 147:a97add6d7e64 152 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
Kojto 147:a97add6d7e64 153 #define MBED_NOINLINE __attribute__((noinline))
Kojto 147:a97add6d7e64 154 #elif defined(__ICCARM__)
Kojto 147:a97add6d7e64 155 #define MBED_NOINLINE _Pragma("inline=never")
Kojto 147:a97add6d7e64 156 #else
Kojto 147:a97add6d7e64 157 #define MBED_NOINLINE
Kojto 147:a97add6d7e64 158 #endif
Kojto 147:a97add6d7e64 159 #endif
Kojto 147:a97add6d7e64 160
<> 138:093f2bd7b9eb 161 /** MBED_FORCEINLINE
<> 138:093f2bd7b9eb 162 * Declare a function that must always be inlined. Failure to inline
<> 138:093f2bd7b9eb 163 * such a function will result in an error.
<> 138:093f2bd7b9eb 164 *
<> 138:093f2bd7b9eb 165 * @code
<> 138:093f2bd7b9eb 166 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 167 *
<> 138:093f2bd7b9eb 168 * MBED_FORCEINLINE void foo() {
<> 138:093f2bd7b9eb 169 *
<> 138:093f2bd7b9eb 170 * }
<> 138:093f2bd7b9eb 171 * @endcode
<> 138:093f2bd7b9eb 172 */
<> 138:093f2bd7b9eb 173 #ifndef MBED_FORCEINLINE
<> 138:093f2bd7b9eb 174 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 175 #define MBED_FORCEINLINE static inline __attribute__((always_inline))
<> 138:093f2bd7b9eb 176 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 177 #define MBED_FORCEINLINE _Pragma("inline=forced") static
<> 138:093f2bd7b9eb 178 #else
<> 138:093f2bd7b9eb 179 #define MBED_FORCEINLINE static inline
<> 138:093f2bd7b9eb 180 #endif
<> 138:093f2bd7b9eb 181 #endif
<> 138:093f2bd7b9eb 182
<> 138:093f2bd7b9eb 183 /** MBED_NORETURN
<> 138:093f2bd7b9eb 184 * Declare a function that will never return.
<> 138:093f2bd7b9eb 185 *
<> 138:093f2bd7b9eb 186 * @code
<> 138:093f2bd7b9eb 187 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 188 *
<> 138:093f2bd7b9eb 189 * MBED_NORETURN void foo() {
<> 138:093f2bd7b9eb 190 * // must never return
<> 138:093f2bd7b9eb 191 * while (1) {}
<> 138:093f2bd7b9eb 192 * }
<> 138:093f2bd7b9eb 193 * @endcode
<> 138:093f2bd7b9eb 194 */
<> 138:093f2bd7b9eb 195 #ifndef MBED_NORETURN
<> 138:093f2bd7b9eb 196 #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 197 #define MBED_NORETURN __attribute__((noreturn))
<> 138:093f2bd7b9eb 198 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 199 #define MBED_NORETURN __noreturn
<> 138:093f2bd7b9eb 200 #else
<> 138:093f2bd7b9eb 201 #define MBED_NORETURN
<> 138:093f2bd7b9eb 202 #endif
<> 138:093f2bd7b9eb 203 #endif
<> 138:093f2bd7b9eb 204
<> 138:093f2bd7b9eb 205 /** MBED_UNREACHABLE
<> 138:093f2bd7b9eb 206 * An unreachable statement. If the statement is reached,
<> 138:093f2bd7b9eb 207 * behaviour is undefined. Useful in situations where the compiler
<> 138:093f2bd7b9eb 208 * cannot deduce the unreachability of code.
<> 138:093f2bd7b9eb 209 *
<> 138:093f2bd7b9eb 210 * @code
<> 138:093f2bd7b9eb 211 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 212 *
<> 138:093f2bd7b9eb 213 * void foo(int arg) {
<> 138:093f2bd7b9eb 214 * switch (arg) {
<> 138:093f2bd7b9eb 215 * case 1: return 1;
<> 138:093f2bd7b9eb 216 * case 2: return 2;
<> 138:093f2bd7b9eb 217 * ...
<> 138:093f2bd7b9eb 218 * }
<> 138:093f2bd7b9eb 219 * MBED_UNREACHABLE;
<> 138:093f2bd7b9eb 220 * }
<> 138:093f2bd7b9eb 221 * @endcode
<> 138:093f2bd7b9eb 222 */
<> 138:093f2bd7b9eb 223 #ifndef MBED_UNREACHABLE
<> 138:093f2bd7b9eb 224 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__CC_ARM)
<> 138:093f2bd7b9eb 225 #define MBED_UNREACHABLE __builtin_unreachable()
<> 138:093f2bd7b9eb 226 #else
<> 138:093f2bd7b9eb 227 #define MBED_UNREACHABLE while (1)
<> 138:093f2bd7b9eb 228 #endif
<> 138:093f2bd7b9eb 229 #endif
<> 138:093f2bd7b9eb 230
<> 138:093f2bd7b9eb 231 /** MBED_DEPRECATED("message string")
<> 138:093f2bd7b9eb 232 * Mark a function declaration as deprecated, if it used then a warning will be
<> 138:093f2bd7b9eb 233 * issued by the compiler possibly including the provided message. Note that not
<> 138:093f2bd7b9eb 234 * all compilers are able to display the message.
<> 138:093f2bd7b9eb 235 *
<> 138:093f2bd7b9eb 236 * @code
<> 138:093f2bd7b9eb 237 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 238 *
<> 138:093f2bd7b9eb 239 * MBED_DEPRECATED("don't foo any more, bar instead")
<> 138:093f2bd7b9eb 240 * void foo(int arg);
<> 138:093f2bd7b9eb 241 * @endcode
<> 138:093f2bd7b9eb 242 */
<> 138:093f2bd7b9eb 243 #ifndef MBED_DEPRECATED
<> 138:093f2bd7b9eb 244 #if defined(__CC_ARM)
<> 138:093f2bd7b9eb 245 #define MBED_DEPRECATED(M) __attribute__((deprecated))
<> 138:093f2bd7b9eb 246 #elif defined(__GNUC__) || defined(__clang__)
<> 138:093f2bd7b9eb 247 #define MBED_DEPRECATED(M) __attribute__((deprecated(M)))
<> 138:093f2bd7b9eb 248 #else
<> 138:093f2bd7b9eb 249 #define MBED_DEPRECATED(M)
<> 138:093f2bd7b9eb 250 #endif
<> 138:093f2bd7b9eb 251 #endif
<> 138:093f2bd7b9eb 252
<> 138:093f2bd7b9eb 253 /** MBED_DEPRECATED_SINCE("version", "message string")
<> 138:093f2bd7b9eb 254 * Mark a function declaration as deprecated, noting that the declaration was
<> 138:093f2bd7b9eb 255 * deprecated on the specified version. If the function is used then a warning
<> 138:093f2bd7b9eb 256 * will be issued by the compiler possibly including the provided message.
<> 138:093f2bd7b9eb 257 * Note that not all compilers are able to display this message.
<> 138:093f2bd7b9eb 258 *
<> 138:093f2bd7b9eb 259 * @code
<> 138:093f2bd7b9eb 260 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 261 *
<> 138:093f2bd7b9eb 262 * MBED_DEPRECATED_SINCE("mbed-os-5.1", "don't foo any more, bar instead")
<> 138:093f2bd7b9eb 263 * void foo(int arg);
<> 138:093f2bd7b9eb 264 * @endcode
<> 138:093f2bd7b9eb 265 */
<> 138:093f2bd7b9eb 266 #define MBED_DEPRECATED_SINCE(D, M) MBED_DEPRECATED(M " [since " D "]")
<> 138:093f2bd7b9eb 267
<> 138:093f2bd7b9eb 268 /** MBED_CALLER_ADDR()
<> 138:093f2bd7b9eb 269 * Returns the caller of the current function.
<> 138:093f2bd7b9eb 270 *
<> 138:093f2bd7b9eb 271 * @note
<> 138:093f2bd7b9eb 272 * This macro is only implemented for GCC and ARMCC.
<> 138:093f2bd7b9eb 273 *
<> 138:093f2bd7b9eb 274 * @code
<> 138:093f2bd7b9eb 275 * #include "mbed_toolchain.h"
<> 138:093f2bd7b9eb 276 *
<> 138:093f2bd7b9eb 277 * printf("This function was called from %p", MBED_CALLER_ADDR());
<> 138:093f2bd7b9eb 278 * @endcode
<> 138:093f2bd7b9eb 279 *
<> 138:093f2bd7b9eb 280 * @return Address of the calling function
<> 138:093f2bd7b9eb 281 */
<> 138:093f2bd7b9eb 282 #ifndef MBED_CALLER_ADDR
<> 138:093f2bd7b9eb 283 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__CC_ARM)
<> 138:093f2bd7b9eb 284 #define MBED_CALLER_ADDR() __builtin_extract_return_addr(__builtin_return_address(0))
<> 138:093f2bd7b9eb 285 #elif defined(__CC_ARM)
<> 138:093f2bd7b9eb 286 #define MBED_CALLER_ADDR() __builtin_return_address(0)
<> 138:093f2bd7b9eb 287 #else
<> 138:093f2bd7b9eb 288 #define MBED_CALLER_ADDR() (NULL)
<> 138:093f2bd7b9eb 289 #endif
<> 138:093f2bd7b9eb 290 #endif
<> 138:093f2bd7b9eb 291
<> 138:093f2bd7b9eb 292 #ifndef MBED_SECTION
<> 138:093f2bd7b9eb 293 #if (defined(__GNUC__) || defined(__clang__)) || defined(__CC_ARM)
<> 138:093f2bd7b9eb 294 #define MBED_SECTION(name) __attribute__ ((section (name)))
<> 138:093f2bd7b9eb 295 #elif defined(__ICCARM__)
<> 138:093f2bd7b9eb 296 #define MBED_SECTION(name) _Pragma(MBED_STRINGIFY(location=name))
<> 138:093f2bd7b9eb 297 #else
<> 138:093f2bd7b9eb 298 #error "Missing MBED_SECTION directive"
<> 138:093f2bd7b9eb 299 #endif
<> 138:093f2bd7b9eb 300 #endif
<> 138:093f2bd7b9eb 301
AnnaBridge 145:64910690c574 302 #ifndef MBED_PRINTF
AnnaBridge 145:64910690c574 303 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 304 #define MBED_PRINTF(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx, first_param_idx)))
AnnaBridge 145:64910690c574 305 #else
AnnaBridge 145:64910690c574 306 #define MBED_PRINTF(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 307 #endif
AnnaBridge 145:64910690c574 308 #endif
AnnaBridge 145:64910690c574 309
AnnaBridge 145:64910690c574 310 #ifndef MBED_PRINTF_METHOD
AnnaBridge 145:64910690c574 311 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 312 #define MBED_PRINTF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__printf__, format_idx+1, first_param_idx+1)))
AnnaBridge 145:64910690c574 313 #else
AnnaBridge 145:64910690c574 314 #define MBED_PRINTF_METHOD(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 315 #endif
AnnaBridge 145:64910690c574 316 #endif
AnnaBridge 145:64910690c574 317
AnnaBridge 145:64910690c574 318 #ifndef MBED_SCANF
AnnaBridge 145:64910690c574 319 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 320 #define MBED_SCANF(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx, first_param_idx)))
AnnaBridge 145:64910690c574 321 #else
AnnaBridge 145:64910690c574 322 #define MBED_SCANF(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 323 #endif
AnnaBridge 145:64910690c574 324 #endif
AnnaBridge 145:64910690c574 325
AnnaBridge 145:64910690c574 326 #ifndef MBED_SCANF_METHOD
AnnaBridge 145:64910690c574 327 #if defined(__GNUC__) || defined(__CC_ARM)
AnnaBridge 145:64910690c574 328 #define MBED_SCANF_METHOD(format_idx, first_param_idx) __attribute__ ((__format__(__scanf__, format_idx+1, first_param_idx+1)))
AnnaBridge 145:64910690c574 329 #else
AnnaBridge 145:64910690c574 330 #define MBED_SCANF_METHOD(format_idx, first_param_idx)
AnnaBridge 145:64910690c574 331 #endif
AnnaBridge 145:64910690c574 332 #endif
AnnaBridge 145:64910690c574 333
<> 138:093f2bd7b9eb 334 // FILEHANDLE declaration
<> 138:093f2bd7b9eb 335 #if defined(TOOLCHAIN_ARM)
<> 138:093f2bd7b9eb 336 #include <rt_sys.h>
<> 138:093f2bd7b9eb 337 #endif
<> 138:093f2bd7b9eb 338
<> 138:093f2bd7b9eb 339 #ifndef FILEHANDLE
<> 138:093f2bd7b9eb 340 typedef int FILEHANDLE;
<> 138:093f2bd7b9eb 341 #endif
<> 138:093f2bd7b9eb 342
<> 138:093f2bd7b9eb 343 // Backwards compatibility
<> 138:093f2bd7b9eb 344 #ifndef WEAK
<> 138:093f2bd7b9eb 345 #define WEAK MBED_WEAK
<> 138:093f2bd7b9eb 346 #endif
<> 138:093f2bd7b9eb 347
<> 138:093f2bd7b9eb 348 #ifndef PACKED
<> 138:093f2bd7b9eb 349 #define PACKED MBED_PACKED()
<> 138:093f2bd7b9eb 350 #endif
<> 138:093f2bd7b9eb 351
<> 138:093f2bd7b9eb 352 #ifndef EXTERN
<> 138:093f2bd7b9eb 353 #define EXTERN extern
<> 138:093f2bd7b9eb 354 #endif
<> 138:093f2bd7b9eb 355
<> 138:093f2bd7b9eb 356 #endif
<> 138:093f2bd7b9eb 357
<> 138:093f2bd7b9eb 358 /** @}*/