agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
cast.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 ykat UG (haftungsbeschraenkt) - All Rights Reserved
3  *
4  * Permission for non-commercial use is hereby granted,
5  * free of charge, without warranty of any kind.
6  */
7 #ifndef ZRTOS_CAST_H
8 #define ZRTOS_CAST_H
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 
14 #ifdef __cplusplus
15 #define ZRTOS_CAST(type,value) static_cast<type>(value)
16 #define ZRTOS_CAST__REINTERPRET(type,value) reinterpret_cast<type>(value)
17 #else
18 #define ZRTOS_CAST(type,value) (type)(value)
19 #define ZRTOS_CAST__REINTERPRET(type,value) (type)(value)
20 #endif
21 
22 
23 #ifdef __cplusplus
24 }
25 #endif
26 #endif