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:
commit
3e922f878a
16
core/doc.txt
16
core/doc.txt
@ -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
|
||||
*/
|
||||
|
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 */
|
||||
/** @} */
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user