1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/include: add xtstr macro

This commit is contained in:
Francisco Molina 2020-04-16 13:49:47 +02:00
parent 623381f9d3
commit cbcb882454
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
2 changed files with 49 additions and 0 deletions

View File

@ -31,3 +31,9 @@
* @ingroup core
* @brief Thread synchronization mechanisms of the kernel
*/
/**
* @defgroup core_macros Common Macros
* @ingroup core
* @brief Commonly used macros header definitions
*/

View File

@ -0,0 +1,43 @@
/*
* Copyright (C) 2019 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup core_macros
* @{
*
* @file
* @brief Macro to return string representation of x
*
* @author Gunar Schorcht <gunar@schorcht.net>
*/
#ifndef MACROS_XTSTR_H
#define MACROS_XTSTR_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def XTSTR
*
* @brief A macro to return the string respresentation of x
*/
#ifndef XTSTR
#define _XTSTR(x) # x
#define XTSTR(x) _XTSTR(x)
#endif /* XTSTR */
#ifdef __cplusplus
}
#endif
#endif /* MACROS_XTSTR_H */
/** @} */