]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53_bsp/psu_cortexa53_0/libsrc/standalone_v5_0/src/xenv.h
Add in the CORTEX_A53_64-bit_UltraScale_MPSoC demo application (a demo has been inclu...
[freertos] / FreeRTOS / Demo / CORTEX_A53_64-bit_UltraScale_MPSoC / RTOSDemo_A53_bsp / psu_cortexa53_0 / libsrc / standalone_v5_0 / src / xenv.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2002 - 2014 Xilinx, Inc. All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
32 /*****************************************************************************/
33 /**
34 *
35 * @file xenv.h
36 *
37 * Defines common services that are typically found in a host operating.
38 * environment. This include file simply includes an OS specific file based
39 * on the compile-time constant BUILD_ENV_*, where * is the name of the target
40 * environment.
41 *
42 * All services are defined as macros.
43 *
44 * <pre>
45 * MODIFICATION HISTORY:
46 *
47 * Ver   Who  Date     Changes
48 * ----- ---- -------- -----------------------------------------------
49 * 1.00b ch   10/24/02 Added XENV_LINUX
50 * 1.00a rmm  04/17/02 First release
51 * </pre>
52 *
53 ******************************************************************************/
54
55 #ifndef XENV_H /* prevent circular inclusions */
56 #define XENV_H /* by using protection macros */
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 /*
63  * Select which target environment we are operating under
64  */
65
66 /* VxWorks target environment */
67 #if defined XENV_VXWORKS
68 #include "xenv_vxworks.h"
69
70 /* Linux target environment */
71 #elif defined XENV_LINUX
72 #include "xenv_linux.h"
73
74 /* Unit test environment */
75 #elif defined XENV_UNITTEST
76 #include "ut_xenv.h"
77
78 /* Integration test environment */
79 #elif defined XENV_INTTEST
80 #include "int_xenv.h"
81
82 /* Standalone environment selected */
83 #else
84 #include "xenv_standalone.h"
85 #endif
86
87
88 /*
89  * The following comments specify the types and macro wrappers that are
90  * expected to be defined by the target specific header files
91  */
92
93 /**************************** Type Definitions *******************************/
94
95 /*****************************************************************************/
96 /**
97  *
98  * XENV_TIME_STAMP
99  *
100  * A structure that contains a time stamp used by other time stamp macros
101  * defined below. This structure is processor dependent.
102  */
103
104
105 /***************** Macros (Inline Functions) Definitions *********************/
106
107 /*****************************************************************************/
108 /**
109  *
110  * XENV_MEM_COPY(void *DestPtr, void *SrcPtr, unsigned Bytes)
111  *
112  * Copies a non-overlapping block of memory.
113  *
114  * @param   DestPtr is the destination address to copy data to.
115  * @param   SrcPtr is the source address to copy data from.
116  * @param   Bytes is the number of bytes to copy.
117  *
118  * @return  None
119  */
120
121 /*****************************************************************************/
122 /**
123  *
124  * XENV_MEM_FILL(void *DestPtr, char Data, unsigned Bytes)
125  *
126  * Fills an area of memory with constant data.
127  *
128  * @param   DestPtr is the destination address to set.
129  * @param   Data contains the value to set.
130  * @param   Bytes is the number of bytes to set.
131  *
132  * @return  None
133  */
134 /*****************************************************************************/
135 /**
136  *
137  * XENV_TIME_STAMP_GET(XTIME_STAMP *StampPtr)
138  *
139  * Samples the processor's or external timer's time base counter.
140  *
141  * @param   StampPtr is the storage for the retrieved time stamp.
142  *
143  * @return  None
144  */
145
146 /*****************************************************************************/
147 /**
148  *
149  * XENV_TIME_STAMP_DELTA_US(XTIME_STAMP *Stamp1Ptr, XTIME_STAMP* Stamp2Ptr)
150  *
151  * Computes the delta between the two time stamps.
152  *
153  * @param   Stamp1Ptr - First sampled time stamp.
154  * @param   Stamp1Ptr - Sedond sampled time stamp.
155  *
156  * @return  An unsigned int value with units of microseconds.
157  */
158
159 /*****************************************************************************/
160 /**
161  *
162  * XENV_TIME_STAMP_DELTA_MS(XTIME_STAMP *Stamp1Ptr, XTIME_STAMP* Stamp2Ptr)
163  *
164  * Computes the delta between the two time stamps.
165  *
166  * @param   Stamp1Ptr - First sampled time stamp.
167  * @param   Stamp1Ptr - Sedond sampled time stamp.
168  *
169  * @return  An unsigned int value with units of milliseconds.
170  */
171
172 /*****************************************************************************//**
173  *
174  * XENV_USLEEP(unsigned delay)
175  *
176  * Delay the specified number of microseconds.
177  *
178  * @param   delay is the number of microseconds to delay.
179  *
180  * @return  None
181  */
182
183 #ifdef __cplusplus
184 }
185 #endif
186
187 #endif            /* end of protection macro */