Describes predefine macros for mbed online compiler (armcc)

Committer:
MACRUM
Date:
Thu Mar 16 21:58:09 2017 +0900
Revision:
6:40e873bbc5f7
Add licence header info

Who changed what in which revision?

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