1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #13875 from fjmolinas/pr_core_macros

core/includes: add common macros file
This commit is contained in:
Koen Zandberg 2020-04-21 15:32:51 +02:00 committed by GitHub
commit 3e922f878a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 11 deletions

View File

@ -26,8 +26,14 @@
* @brief Configuration data and startup code for the kernel
*/
/**
* @defgroup core_sync Thread Synchronization
* @ingroup core
* @brief Thread synchronization mechanisms of the kernel
*/
/**
* @defgroup core_sync Thread Synchronization
* @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 */
/** @} */

View File

@ -28,15 +28,10 @@ extern "C" {
#include "log.h"
#include "esp_common_log.h"
#include "macros/xtstr.h"
#define asm __asm__
/** string representation of x */
#ifndef XTSTR
#define _XTSTR(x) # x
#define XTSTR(x) _XTSTR(x)
#endif /* XSTR */
#if !defined(ICACHE_FLASH)
#ifndef ICACHE_RAM_ATTR
/** Places the code with this attribute in the IRAM. */