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:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 171:3a7713b1edbc 1 #ifndef _TPASTE_H_
AnnaBridge 171:3a7713b1edbc 2 #define _TPASTE_H_
AnnaBridge 171:3a7713b1edbc 3
AnnaBridge 171:3a7713b1edbc 4 /**
AnnaBridge 171:3a7713b1edbc 5 * \defgroup group_sam0_utils_tpaste Preprocessor - Token Paste
AnnaBridge 171:3a7713b1edbc 6 *
AnnaBridge 171:3a7713b1edbc 7 * \ingroup group_sam0_utils
AnnaBridge 171:3a7713b1edbc 8 *
AnnaBridge 171:3a7713b1edbc 9 * @{
AnnaBridge 171:3a7713b1edbc 10 */
AnnaBridge 171:3a7713b1edbc 11
AnnaBridge 171:3a7713b1edbc 12 /** \name Token Paste
AnnaBridge 171:3a7713b1edbc 13 *
AnnaBridge 171:3a7713b1edbc 14 * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
AnnaBridge 171:3a7713b1edbc 15 *
AnnaBridge 171:3a7713b1edbc 16 * May be used only within macros with the tokens passed as arguments if the tokens are \#defined.
AnnaBridge 171:3a7713b1edbc 17 *
AnnaBridge 171:3a7713b1edbc 18 * For example, writing TPASTE2(U, WIDTH) within a macro \#defined by
AnnaBridge 171:3a7713b1edbc 19 * UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is
AnnaBridge 171:3a7713b1edbc 20 * equivalent to writing U32.
AnnaBridge 171:3a7713b1edbc 21 *
AnnaBridge 171:3a7713b1edbc 22 * @{ */
AnnaBridge 171:3a7713b1edbc 23 #define TPASTE2( a, b) a##b
AnnaBridge 171:3a7713b1edbc 24 #define TPASTE3( a, b, c) a##b##c
AnnaBridge 171:3a7713b1edbc 25 #define TPASTE4( a, b, c, d) a##b##c##d
AnnaBridge 171:3a7713b1edbc 26 #define TPASTE5( a, b, c, d, e) a##b##c##d##e
AnnaBridge 171:3a7713b1edbc 27 #define TPASTE6( a, b, c, d, e, f) a##b##c##d##e##f
AnnaBridge 171:3a7713b1edbc 28 #define TPASTE7( a, b, c, d, e, f, g) a##b##c##d##e##f##g
AnnaBridge 171:3a7713b1edbc 29 #define TPASTE8( a, b, c, d, e, f, g, h) a##b##c##d##e##f##g##h
AnnaBridge 171:3a7713b1edbc 30 #define TPASTE9( a, b, c, d, e, f, g, h, i) a##b##c##d##e##f##g##h##i
AnnaBridge 171:3a7713b1edbc 31 #define TPASTE10(a, b, c, d, e, f, g, h, i, j) a##b##c##d##e##f##g##h##i##j
AnnaBridge 171:3a7713b1edbc 32 /** @} */
AnnaBridge 171:3a7713b1edbc 33
AnnaBridge 171:3a7713b1edbc 34 /** \name Absolute Token Paste
AnnaBridge 171:3a7713b1edbc 35 *
AnnaBridge 171:3a7713b1edbc 36 * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
AnnaBridge 171:3a7713b1edbc 37 *
AnnaBridge 171:3a7713b1edbc 38 * No restriction of use if the tokens are \#defined.
AnnaBridge 171:3a7713b1edbc 39 *
AnnaBridge 171:3a7713b1edbc 40 * For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined
AnnaBridge 171:3a7713b1edbc 41 * as 32 is equivalent to writing U32.
AnnaBridge 171:3a7713b1edbc 42 *
AnnaBridge 171:3a7713b1edbc 43 * @{ */
AnnaBridge 171:3a7713b1edbc 44 #define ATPASTE2( a, b) TPASTE2( a, b)
AnnaBridge 171:3a7713b1edbc 45 #define ATPASTE3( a, b, c) TPASTE3( a, b, c)
AnnaBridge 171:3a7713b1edbc 46 #define ATPASTE4( a, b, c, d) TPASTE4( a, b, c, d)
AnnaBridge 171:3a7713b1edbc 47 #define ATPASTE5( a, b, c, d, e) TPASTE5( a, b, c, d, e)
AnnaBridge 171:3a7713b1edbc 48 #define ATPASTE6( a, b, c, d, e, f) TPASTE6( a, b, c, d, e, f)
AnnaBridge 171:3a7713b1edbc 49 #define ATPASTE7( a, b, c, d, e, f, g) TPASTE7( a, b, c, d, e, f, g)
AnnaBridge 171:3a7713b1edbc 50 #define ATPASTE8( a, b, c, d, e, f, g, h) TPASTE8( a, b, c, d, e, f, g, h)
AnnaBridge 171:3a7713b1edbc 51 #define ATPASTE9( a, b, c, d, e, f, g, h, i) TPASTE9( a, b, c, d, e, f, g, h, i)
AnnaBridge 171:3a7713b1edbc 52 #define ATPASTE10(a, b, c, d, e, f, g, h, i, j) TPASTE10(a, b, c, d, e, f, g, h, i, j)
AnnaBridge 171:3a7713b1edbc 53 /** @} */
AnnaBridge 171:3a7713b1edbc 54
AnnaBridge 171:3a7713b1edbc 55 /** @} */
AnnaBridge 171:3a7713b1edbc 56
AnnaBridge 171:3a7713b1edbc 57 #endif // _TPASTE_H_