1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00
RIOT/core/lib/include/riot_version.h
JerelJr 04dafd5618 core: replace header guards with #pragma once
core/lib/include/ringbuffer.h: removed trailing newline

core/lib/include/irq.h: restored header guard for irq.h to resolve build errors

core/lib/include/irq.h: added trailing newline to irq.h
2025-04-15 14:55:38 -04:00

63 lines
1.8 KiB
C

/*
* Copyright (C) 2014 Freie Universität Berlin
* 2017 HAW-Hamburg
*
* 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.
*/
#pragma once
/**
* @ingroup core_internal
* @{
*
* @file
* @brief Common macros and compiler attributes/pragmas configuration
*
* @author René Kijewski <rene.kijewski@fu-berlin.de>
* @author Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
*/
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def RIOT_VERSION_NUM(major, minor, patch, extra)
* @brief Generates a 64 bit variable of a release version.
* Comparisons to this only apply to released branches
*
* To define @p extra add a file `EXTRAVERSION` to the RIOT root
* with the content
*
* RIOT_EXTRAVERSION = <extra>
*
* with `<extra>` being the number of your local version.
* This can be useful if you are maintaining a downstream
* release to base further work on.
*
* @warning This is only intended to be used with external boards or
* modules.
* In-tree code must not make use of this macro.
*
* @param[in] major Mayor version of the release
* @param[in] minor Minor version of the release
* @param[in] patch Patch level of the release
* @param[in] extra Extra version, user defined
*
* @returns A machine readable version variable
*/
#define RIOT_VERSION_NUM(major, minor, patch, extra) \
(((0ULL + major) << 48) + ((0ULL + minor) << 32) + \
((0ULL + patch) << 16) + (extra))
#ifdef __cplusplus
}
#endif
/** @} */