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:
parent
623381f9d3
commit
cbcb882454
@ -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
|
||||
*/
|
||||
|
43
core/include/macros/xtstr.h
Normal file
43
core/include/macros/xtstr.h
Normal 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 */
|
||||
/** @} */
|
Loading…
Reference in New Issue
Block a user