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.
mbed-dev/platform/mbed_preprocessor.h@6:0018763974d3, 2017-02-25 (annotated)
- Committer:
- elmot
- Date:
- Sat Feb 25 08:59:21 2017 +0000
- Revision:
- 6:0018763974d3
- Parent:
- 1:d0dfbce63a89
No comment
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| elmot | 1:d0dfbce63a89 | 1 | /** \addtogroup platform */ |
| elmot | 1:d0dfbce63a89 | 2 | /** @{*/ |
| elmot | 1:d0dfbce63a89 | 3 | /* mbed Microcontroller Library |
| elmot | 1:d0dfbce63a89 | 4 | * Copyright (c) 2006-2013 ARM Limited |
| elmot | 1:d0dfbce63a89 | 5 | * |
| elmot | 1:d0dfbce63a89 | 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| elmot | 1:d0dfbce63a89 | 7 | * you may not use this file except in compliance with the License. |
| elmot | 1:d0dfbce63a89 | 8 | * You may obtain a copy of the License at |
| elmot | 1:d0dfbce63a89 | 9 | * |
| elmot | 1:d0dfbce63a89 | 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| elmot | 1:d0dfbce63a89 | 11 | * |
| elmot | 1:d0dfbce63a89 | 12 | * Unless required by applicable law or agreed to in writing, software |
| elmot | 1:d0dfbce63a89 | 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| elmot | 1:d0dfbce63a89 | 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| elmot | 1:d0dfbce63a89 | 15 | * See the License for the specific language governing permissions and |
| elmot | 1:d0dfbce63a89 | 16 | * limitations under the License. |
| elmot | 1:d0dfbce63a89 | 17 | */ |
| elmot | 1:d0dfbce63a89 | 18 | #ifndef MBED_PREPROCESSOR_H |
| elmot | 1:d0dfbce63a89 | 19 | #define MBED_PREPROCESSOR_H |
| elmot | 1:d0dfbce63a89 | 20 | |
| elmot | 1:d0dfbce63a89 | 21 | |
| elmot | 1:d0dfbce63a89 | 22 | /** MBED_CONCAT |
| elmot | 1:d0dfbce63a89 | 23 | * Concatenate tokens together |
| elmot | 1:d0dfbce63a89 | 24 | * |
| elmot | 1:d0dfbce63a89 | 25 | * @note |
| elmot | 1:d0dfbce63a89 | 26 | * Expands tokens before concatenation |
| elmot | 1:d0dfbce63a89 | 27 | * |
| elmot | 1:d0dfbce63a89 | 28 | * @code |
| elmot | 1:d0dfbce63a89 | 29 | * // Creates a unique label based on the line number |
| elmot | 1:d0dfbce63a89 | 30 | * int MBED_CONCAT(UNIQUE_LABEL_, __LINE__) = 1; |
| elmot | 1:d0dfbce63a89 | 31 | * @endcode |
| elmot | 1:d0dfbce63a89 | 32 | */ |
| elmot | 1:d0dfbce63a89 | 33 | #define MBED_CONCAT(a, b) MBED_CONCAT_(a, b) |
| elmot | 1:d0dfbce63a89 | 34 | #define MBED_CONCAT_(a, b) a##b |
| elmot | 1:d0dfbce63a89 | 35 | |
| elmot | 1:d0dfbce63a89 | 36 | /** MBED_STRINGIFY |
| elmot | 1:d0dfbce63a89 | 37 | * Converts tokens into strings |
| elmot | 1:d0dfbce63a89 | 38 | * |
| elmot | 1:d0dfbce63a89 | 39 | * @note |
| elmot | 1:d0dfbce63a89 | 40 | * Expands tokens before stringification |
| elmot | 1:d0dfbce63a89 | 41 | * |
| elmot | 1:d0dfbce63a89 | 42 | * @code |
| elmot | 1:d0dfbce63a89 | 43 | * // Creates a string based on the parameters |
| elmot | 1:d0dfbce63a89 | 44 | * const char *c = MBED_STRINGIFY(This is a ridiculous way to create a string) |
| elmot | 1:d0dfbce63a89 | 45 | * @endcode |
| elmot | 1:d0dfbce63a89 | 46 | */ |
| elmot | 1:d0dfbce63a89 | 47 | #define MBED_STRINGIFY(a) MBED_STRINGIFY_(a) |
| elmot | 1:d0dfbce63a89 | 48 | #define MBED_STRINGIFY_(a) #a |
| elmot | 1:d0dfbce63a89 | 49 | |
| elmot | 1:d0dfbce63a89 | 50 | |
| elmot | 1:d0dfbce63a89 | 51 | #endif |
| elmot | 1:d0dfbce63a89 | 52 | |
| elmot | 1:d0dfbce63a89 | 53 | /** @}*/ |