iLLD_TC27xC  1.0
IfxStdIf.h
Go to the documentation of this file.
1 /**
2  * \file IfxStdIf.h
3  * \brief Standard interface types
4  * \ingroup IfxLld
5  *
6  * \version iLLD_1_0_0_11_0
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  *
25  * \defgroup library_srvsw_stdif Standard interface
26  * \ingroup library_srvsw
27  *
28  *
29  *
30  * \par Terms
31  *
32  * Term | Description
33  * ------------------------- | -------
34  * Standard Interface | Interface defined in this document
35  * Interface Driver | Specific device driver as defined by the iLLD
36  * Standard Interface Driver | Specific interface driver which implements the Standard Interface
37  * API used at runtime | API that are used after initialization
38  *
39  * \par Overview
40  * The Standard Interface provides generic runtime API written in C for common use case application. It abstracts the underlaying Interface Driver,
41  * i.e. the runtime API is completely device independent. It provides generic API for common use case application.
42  *
43  * Example of Standard Interface:
44  * - Serial communication interface
45  * - PWM interface
46  * - Position sensor interface
47  * - Timer interface
48  * - EEPROM interface
49  *
50  * The target is to be able to exchange the microcontroller or external connected devices on which the application is based with a minimal impact
51  * on the application code, to reduce the application software development and maintenance effort. This is archived by the Standard Interface,
52  * for which, changing the hardware only requires the update of the device configuration settings and the device initialization code. The API used
53  * at runtime, which represents the majority and the complexitity of the related code keep unchanged.
54  *
55  * Motivation: because the current software developed for the automotive applications mainly don’t use C++, the Standard Interface provides a common
56  * definition for the device driver and an alternative layer for different hardware instead of using C++ interface wrapper class.
57  *
58  *
59  * The below figure shows the layers used and an example of APIs used by the application.
60  * \image html "StandardInterfaceLayers.png" "Standard interface layers"
61  * \image html "StandardInterfaceDataPipeExample.png" "Standard interface example: Serial interface as data pipe"
62  * \image html "StandardInterfaceTimerExample.png" "Standard interface example: Timer"
63  *
64  * The Standard Interface is implemented by Standard Interface wrapper by providing the function pointer to the custom functions. This gives
65  * the possibility to the programmer to use it or not. When used, it increases the code portability but slightly decreases the performance in
66  * term of run time execution and code size. When not used, the performance is not affected.
67  *
68  *
69  * \par Definition
70  * The standard interface requires the definition of at least two components: the standard interface component and the standard interface wrapper
71  * component. The standard interface component defines for each standard interface a standard interface object and a set of standard APIs used at
72  * runtime by the application. The standard interface wrapper component initializes the standard interface component by linking it to the interface
73  * driver.
74  *
75  * \attention: The application shall explicitly use the API provided by the standard interface component at runtime to access driver’s parameters
76  * (setter/ getter) or action (methods). Trying to access members of the standard interface component directly though the object may not guaranty
77  * future code compatibility. The same applies to the interface driver (reminder).
78  *
79  *
80  * \par Convention
81  *
82  * The Standard interface defines the following files:
83  * Path/File | Description
84  * ------------------------------------------ | -----------------
85  * 1_SrvSw/StdIf/IfxStdIf.h | Global standard interface definitions
86  * 1_SrvSw/StdIf/IfxStdIf_<std interface>.h | Specific standard interface definitions
87  * TCxxx/<Module>/Ifx<Module>_<interface>.h/c | Specific standard interface wrapper initialization API are reconized by the name Ifx<Module>_<interface>_StdIf<std interface>Init()
88  * TCxxx/<Module>/Ifx<Module>_<interface>.h/c | Specific standard interface wrapper function API are named according to the interface driver naming rules
89  *
90  */
91 
92 #ifndef IFXSTDIF_H_
93 #define IFXSTDIF_H_ 1
94 
95 #include "Cpu/Std/Ifx_Types.h"
96 
97 typedef void *IfxStdIf_InterfaceDriver; /**< \brief Pointer to the specific interface driver */
98 
99 #endif /* IFXSTDIF_H_ */