Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_preprocessor.h Source File

mbed_preprocessor.h

00001 /** \addtogroup platform */
00002 /** @{*/
00003 /* mbed Microcontroller Library
00004  * Copyright (c) 2006-2013 ARM Limited
00005  *
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  *     http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 #ifndef MBED_PREPROCESSOR_H
00019 #define MBED_PREPROCESSOR_H
00020 
00021 
00022 /** MBED_CONCAT
00023  *  Concatenate tokens together
00024  *
00025  *  @note
00026  *  Expands tokens before concatenation
00027  *
00028  *  @code
00029  *  // Creates a unique label based on the line number
00030  *  int MBED_CONCAT(UNIQUE_LABEL_, __LINE__) = 1;
00031  *  @endcode
00032  */
00033 #define MBED_CONCAT(a, b) MBED_CONCAT_(a, b)
00034 #define MBED_CONCAT_(a, b) a##b
00035 
00036 /** MBED_STRINGIFY
00037  *  Converts tokens into strings
00038  *
00039  *  @note
00040  *  Expands tokens before stringification
00041  *
00042  *  @code
00043  *  // Creates a string based on the parameters
00044  *  const char *c = MBED_STRINGIFY(This is a ridiculous way to create a string)
00045  *  @endcode
00046  */
00047 #define MBED_STRINGIFY(a) MBED_STRINGIFY_(a)
00048 #define MBED_STRINGIFY_(a) #a
00049 
00050 
00051 #endif
00052 
00053 /** @}*/