/
tpl_os_errorhook.h
62 lines (52 loc) · 1.31 KB
/
tpl_os_errorhook.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* @file tpl_os_errorhook.h
*
* @section descr File description
*
* Trampoline Error hook function header
*
* @section copyright Copyright
*
* Trampoline RTOS
*
* Trampoline is copyright (c) CNRS, University of Nantes, Ecole Centrale de Nantes
* Trampoline is protected by the French intellectual property law.
*
* This software is distributed under the GNU Public Licence V2.
* Check the LICENSE file in the root directory of Trampoline
*
* @section infos File informations
*
* $Date$
* $Rev$
* $Author$
* $URL$
*/
#ifndef TPL_OS_ERRORHOOK_H
#define TPL_OS_ERRORHOOK_H
#include "tpl_os_types.h"
#define OS_START_SEC_CODE
#include "tpl_memmap.h"
/**
* this function is used to call the ErrorHook callback
*
* @param tpl_status The error code which causes the call back
*/
FUNC(void, OS_CODE) tpl_call_error_hook(
CONST(tpl_status, AUTOMATIC) error);
#define OS_STOP_SEC_CODE
#include "tpl_memmap.h"
#if WITH_ERROR_HOOK == YES
#define OS_START_SEC_CODE
#include "tpl_memmap.h"
/*
* The function corresponding to this prototype should be provided
* by the application
*/
extern FUNC(void, OS_CODE) ErrorHook(
VAR(StatusType, AUTOMATIC) error);
#define OS_STOP_SEC_CODE
#include "tpl_memmap.h"
#endif /* WITH_ERROR_HOOK */
#endif /* TPL_OS_ERRORHOOK_H */
/* End of file tpl_os_errorhook.h */