diff options
Diffstat (limited to 'drivers/staging/epl/EplNmtuCal.c')
-rw-r--r-- | drivers/staging/epl/EplNmtuCal.c | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/drivers/staging/epl/EplNmtuCal.c b/drivers/staging/epl/EplNmtuCal.c new file mode 100644 index 00000000000..e76f250c6c1 --- /dev/null +++ b/drivers/staging/epl/EplNmtuCal.c | |||
@@ -0,0 +1,164 @@ | |||
1 | /**************************************************************************** | ||
2 | |||
3 | (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29 | ||
4 | www.systec-electronic.com | ||
5 | |||
6 | Project: openPOWERLINK | ||
7 | |||
8 | Description: source file for communication abstraction layer of the | ||
9 | NMT-Userspace-Module | ||
10 | |||
11 | License: | ||
12 | |||
13 | Redistribution and use in source and binary forms, with or without | ||
14 | modification, are permitted provided that the following conditions | ||
15 | are met: | ||
16 | |||
17 | 1. Redistributions of source code must retain the above copyright | ||
18 | notice, this list of conditions and the following disclaimer. | ||
19 | |||
20 | 2. Redistributions in binary form must reproduce the above copyright | ||
21 | notice, this list of conditions and the following disclaimer in the | ||
22 | documentation and/or other materials provided with the distribution. | ||
23 | |||
24 | 3. Neither the name of SYSTEC electronic GmbH nor the names of its | ||
25 | contributors may be used to endorse or promote products derived | ||
26 | from this software without prior written permission. For written | ||
27 | permission, please contact info@systec-electronic.com. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
30 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
31 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
32 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
33 | COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
34 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
35 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
36 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
37 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
38 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
39 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
40 | POSSIBILITY OF SUCH DAMAGE. | ||
41 | |||
42 | Severability Clause: | ||
43 | |||
44 | If a provision of this License is or becomes illegal, invalid or | ||
45 | unenforceable in any jurisdiction, that shall not affect: | ||
46 | 1. the validity or enforceability in that jurisdiction of any other | ||
47 | provision of this License; or | ||
48 | 2. the validity or enforceability in other jurisdictions of that or | ||
49 | any other provision of this License. | ||
50 | |||
51 | ------------------------------------------------------------------------- | ||
52 | |||
53 | $RCSfile: EplNmtuCal.c,v $ | ||
54 | |||
55 | $Author: D.Krueger $ | ||
56 | |||
57 | $Revision: 1.4 $ $Date: 2008/10/17 15:32:32 $ | ||
58 | |||
59 | $State: Exp $ | ||
60 | |||
61 | Build Environment: | ||
62 | KEIL uVision 2 | ||
63 | |||
64 | ------------------------------------------------------------------------- | ||
65 | |||
66 | Revision History: | ||
67 | |||
68 | 2006/06/16 -k.t.: start of the implementation | ||
69 | |||
70 | ****************************************************************************/ | ||
71 | |||
72 | #include "user/EplNmtuCal.h" | ||
73 | |||
74 | /***************************************************************************/ | ||
75 | /* */ | ||
76 | /* */ | ||
77 | /* G L O B A L D E F I N I T I O N S */ | ||
78 | /* */ | ||
79 | /* */ | ||
80 | /***************************************************************************/ | ||
81 | |||
82 | //--------------------------------------------------------------------------- | ||
83 | // const defines | ||
84 | //--------------------------------------------------------------------------- | ||
85 | |||
86 | //--------------------------------------------------------------------------- | ||
87 | // local types | ||
88 | //--------------------------------------------------------------------------- | ||
89 | |||
90 | //--------------------------------------------------------------------------- | ||
91 | // modul globale vars | ||
92 | //--------------------------------------------------------------------------- | ||
93 | |||
94 | //--------------------------------------------------------------------------- | ||
95 | // local function prototypes | ||
96 | //--------------------------------------------------------------------------- | ||
97 | |||
98 | |||
99 | |||
100 | |||
101 | //=========================================================================// | ||
102 | // // | ||
103 | // P U B L I C F U N C T I O N S // | ||
104 | // // | ||
105 | //=========================================================================// | ||
106 | |||
107 | //--------------------------------------------------------------------------- | ||
108 | // | ||
109 | // Function: EplNmtkCalGetNmtState | ||
110 | // | ||
111 | // Description: return current NMT-State | ||
112 | // -> encapsulate access to kernelspace | ||
113 | // | ||
114 | // | ||
115 | // | ||
116 | // Parameters: | ||
117 | // | ||
118 | // | ||
119 | // Returns: tEplNmtState = current NMT-State | ||
120 | // | ||
121 | // | ||
122 | // State: | ||
123 | // | ||
124 | //--------------------------------------------------------------------------- | ||
125 | EPLDLLEXPORT tEplNmtState PUBLIC EplNmtkCalGetNmtState() | ||
126 | { | ||
127 | tEplNmtState NmtState; | ||
128 | // for test direkt call for EplNmtkGetNmtState() | ||
129 | #if(((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMTK)) != 0) | ||
130 | NmtState = EplNmtkGetNmtState(); | ||
131 | #else | ||
132 | NmtState = 0; | ||
133 | #endif | ||
134 | return NmtState; | ||
135 | } | ||
136 | |||
137 | //=========================================================================// | ||
138 | // // | ||
139 | // P R I V A T E F U N C T I O N S // | ||
140 | // // | ||
141 | //=========================================================================// | ||
142 | |||
143 | //--------------------------------------------------------------------------- | ||
144 | // | ||
145 | // Function: | ||
146 | // | ||
147 | // Description: | ||
148 | // | ||
149 | // | ||
150 | // | ||
151 | // Parameters: | ||
152 | // | ||
153 | // | ||
154 | // Returns: | ||
155 | // | ||
156 | // | ||
157 | // State: | ||
158 | // | ||
159 | //--------------------------------------------------------------------------- | ||
160 | |||
161 | |||
162 | |||
163 | // EOF | ||
164 | |||