TNeo
v1.09
tn_app_check.c
Go to the documentation of this file.
1
/*******************************************************************************
2
*
3
* TNeo: real-time kernel initially based on TNKernel
4
*
5
* TNKernel: copyright 2004, 2013 Yuri Tiomkin.
6
* PIC32-specific routines: copyright 2013, 2014 Anders Montonen.
7
* TNeo: copyright 2014 Dmitry Frank.
8
*
9
* TNeo was born as a thorough review and re-implementation of
10
* TNKernel. The new kernel has well-formed code, inherited bugs are fixed
11
* as well as new features being added, and it is tested carefully with
12
* unit-tests.
13
*
14
* API is changed somewhat, so it's not 100% compatible with TNKernel,
15
* hence the new name: TNeo.
16
*
17
* Permission to use, copy, modify, and distribute this software in source
18
* and binary forms and its documentation for any purpose and without fee
19
* is hereby granted, provided that the above copyright notice appear
20
* in all copies and that both that copyright notice and this permission
21
* notice appear in supporting documentation.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE DMITRY FRANK AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DMITRY FRANK OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
* THE POSSIBILITY OF SUCH DAMAGE.
34
*
35
******************************************************************************/
36
37
/**
38
* \file
39
*
40
* If `#TN_CHECK_BUILD_CFG` option is non-zero, this file needs to be included
41
* in the application project.
42
*
43
* For details, see the aforementioned option `#TN_CHECK_BUILD_CFG`.
44
*
45
*/
46
47
48
/*******************************************************************************
49
* INCLUDED FILES
50
******************************************************************************/
51
52
#include "
tn.h
"
53
54
//-- std header for memset() that is used inside the macro
55
// `_TN_BUILD_CFG_STRUCT_FILL()`
56
#include <string.h>
57
58
59
60
#if TN_CHECK_BUILD_CFG
61
62
63
/*******************************************************************************
64
* PRIVATE DATA
65
******************************************************************************/
66
67
#ifndef DOXYGEN_SHOULD_SKIP_THIS
68
69
static
struct
_TN_BuildCfg
_build_cfg;
70
71
#endif // DOXYGEN_SHOULD_SKIP_THIS
72
73
74
75
/*******************************************************************************
76
* DEFINITIONS
77
******************************************************************************/
78
79
/*******************************************************************************
80
* PRIVATE FUNCTIONS
81
******************************************************************************/
82
83
/*******************************************************************************
84
* PUBLIC FUNCTIONS
85
******************************************************************************/
86
87
/**
88
* Dummy function that helps user to undefstand that he/she forgot to add file
89
* tn_app_check.c to the project. It is called from tn_sys.c .
90
*/
91
void
you_should_add_file___tn_app_check_c___to_the_project
(
void
)
92
{
93
}
94
95
/**
96
* Return build configuration used for application.
97
*/
98
const
struct
_TN_BuildCfg
*
tn_app_build_cfg_get
(
void
)
99
{
100
_TN_BUILD_CFG_STRUCT_FILL
(&_build_cfg);
101
return
&_build_cfg;
102
}
103
104
#endif // TN_CHECK_BUILD_CFG
105
you_should_add_file___tn_app_check_c___to_the_project
void you_should_add_file___tn_app_check_c___to_the_project(void)
Dummy function that helps user to undefstand that he/she forgot to add file tn_app_check....
Definition:
tn_app_check.c:91
tn.h
_TN_BUILD_CFG_STRUCT_FILL
#define _TN_BUILD_CFG_STRUCT_FILL(_p_struct)
For internal kernel usage: fill the structure #_TN_BuildCfg with current build-time configuration val...
Definition:
tn_sys.h:119
tn_app_build_cfg_get
const struct _TN_BuildCfg * tn_app_build_cfg_get(void)
Return build configuration used for application.
Definition:
tn_app_check.c:98
_TN_BuildCfg
Structure with build-time configurations values; it is needed for run-time check which ensures that b...
Definition:
tn_sys.h:169
Generated on Sat Dec 28 2024 20:20:49 for TNeo by
1.8.17