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