1 /*****************************************************************************
2  *
3  * \file
4  *
5  * \brief Preprocessor stringizing utils.
6  *
7  * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
8  *
9  * \asf_license_start
10  *
11  * \page License
12  *
13  * Subject to your compliance with these terms, you may use Microchip
14  * software and any derivatives exclusively with Microchip products.
15  * It is your responsibility to comply with third party license terms applicable
16  * to your use of third party software (including open source software) that
17  * may accompany Microchip software.
18  *
19  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
20  * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
21  * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
22  * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
23  * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
24  * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
25  * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
26  * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.  TO THE FULLEST EXTENT
27  * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
28  * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
29  * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
30  *
31  * \asf_license_stop
32  *
33  ******************************************************************************/
34 /*
35  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
36  */
37 
38 
39 #ifndef _STRINGZ_H_
40 #define _STRINGZ_H_
41 
42 /**
43  * \defgroup group_avr32_utils_stringz Preprocessor - Stringize
44  *
45  * \ingroup group_avr32_utils
46  *
47  * \{
48  */
49 
50 /*! \brief Stringize.
51  *
52  * Stringize a preprocessing token, this token being allowed to be \#defined.
53  *
54  * May be used only within macros with the token passed as an argument if the token is \#defined.
55  *
56  * For example, writing STRINGZ(PIN) within a macro \#defined by PIN_NAME(PIN)
57  * and invoked as PIN_NAME(PIN0) with PIN0 \#defined as A0 is equivalent to
58  * writing "A0".
59  */
60 #define STRINGZ(x)                                #x
61 
62 /*! \brief Absolute stringize.
63  *
64  * Stringize a preprocessing token, this token being allowed to be \#defined.
65  *
66  * No restriction of use if the token is \#defined.
67  *
68  * For example, writing ASTRINGZ(PIN0) anywhere with PIN0 \#defined as A0 is
69  * equivalent to writing "A0".
70  */
71 #define ASTRINGZ(x)                               STRINGZ(x)
72 
73 /**
74  * \}
75  */
76 
77 #endif  // _STRINGZ_H_
78