1 |
5 |
quickwayne |
/******************************************************************************
|
2 |
|
|
*
|
3 |
|
|
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
|
4 |
|
|
* AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
|
5 |
|
|
* SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE,
|
6 |
|
|
* OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
|
7 |
|
|
* APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
|
8 |
|
|
* THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
|
9 |
|
|
* AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
|
10 |
|
|
* FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY
|
11 |
|
|
* WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
|
12 |
|
|
* IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
|
13 |
|
|
* REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
|
14 |
|
|
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
15 |
|
|
* FOR A PARTICULAR PURPOSE.
|
16 |
|
|
*
|
17 |
|
|
* (c) Copyright 2002 Xilinx Inc.
|
18 |
|
|
* All rights reserved.
|
19 |
|
|
*
|
20 |
|
|
******************************************************************************/
|
21 |
|
|
/*****************************************************************************/
|
22 |
|
|
/**
|
23 |
|
|
*
|
24 |
|
|
* @file xenv_none.h
|
25 |
|
|
*
|
26 |
|
|
* Defines common services specified by xenv.h. Some of these services are
|
27 |
|
|
* defined as not performing any action. The implementation of these services
|
28 |
|
|
* are left to the user.
|
29 |
|
|
*
|
30 |
|
|
* @note
|
31 |
|
|
*
|
32 |
|
|
* This file is not intended to be included directly by driver code. Instead,
|
33 |
|
|
* the generic xenv.h file is intended to be included by driver code.
|
34 |
|
|
*
|
35 |
|
|
* <pre>
|
36 |
|
|
* MODIFICATION HISTORY:
|
37 |
|
|
*
|
38 |
|
|
* Ver Who Date Changes
|
39 |
|
|
* ----- ---- -------- -----------------------------------------------
|
40 |
|
|
* 1.00a rmm 03/21/02 First release
|
41 |
|
|
* 1.00a xd 11/03/04 Improved support for doxygen.
|
42 |
|
|
* </pre>
|
43 |
|
|
*
|
44 |
|
|
*
|
45 |
|
|
******************************************************************************/
|
46 |
|
|
|
47 |
|
|
#ifndef XENV_NONE_H /* prevent circular inclusions */
|
48 |
|
|
#define XENV_NONE_H /* by using protection macros */
|
49 |
|
|
|
50 |
|
|
/***************************** Include Files *********************************/
|
51 |
|
|
|
52 |
|
|
/*****************************************************************************/
|
53 |
|
|
/**
|
54 |
|
|
*
|
55 |
|
|
* Copies a non-overlapping block of memory.
|
56 |
|
|
*
|
57 |
|
|
* @param DestPtr is the destination address to copy data to.
|
58 |
|
|
* @param SrcPtr is the source address to copy data from.
|
59 |
|
|
* @param Bytes is the number of bytes to copy.
|
60 |
|
|
*
|
61 |
|
|
* @return None.
|
62 |
|
|
*
|
63 |
|
|
* @note
|
64 |
|
|
*
|
65 |
|
|
* Signature: void XENV_MEM_COPY(void *DestPtr, void *SrcPtr, unsigned Bytes)
|
66 |
|
|
*
|
67 |
|
|
*****************************************************************************/
|
68 |
|
|
#define XENV_MEM_COPY(DestPtr, SrcPtr, Bytes) \
|
69 |
|
|
{ \
|
70 |
|
|
char *Dest = (char*)(DestPtr); \
|
71 |
|
|
char *Src = (char*)(SrcPtr); \
|
72 |
|
|
unsigned BytesLeft = (Bytes); \
|
73 |
|
|
\
|
74 |
|
|
while (BytesLeft--) *Dest++ = *Src++; \
|
75 |
|
|
}
|
76 |
|
|
|
77 |
|
|
/*****************************************************************************/
|
78 |
|
|
/**
|
79 |
|
|
*
|
80 |
|
|
* Fills an area of memory with constant data.
|
81 |
|
|
*
|
82 |
|
|
* @param DestPtr is the destination address to set.
|
83 |
|
|
* @param Data contains the value to set.
|
84 |
|
|
* @param Bytes is the number of bytes to set.
|
85 |
|
|
*
|
86 |
|
|
* @return None.
|
87 |
|
|
*
|
88 |
|
|
* @note
|
89 |
|
|
*
|
90 |
|
|
* Signature: void XENV_MEM_FILL(void *DestPtr, char Data, unsigned Bytes)
|
91 |
|
|
*
|
92 |
|
|
*****************************************************************************/
|
93 |
|
|
#define XENV_MEM_FILL(DestPtr, Data, Bytes) \
|
94 |
|
|
{ \
|
95 |
|
|
char *Dest = (char*)(DestPtr); \
|
96 |
|
|
char c = (Data); \
|
97 |
|
|
unsigned BytesLeft = (Bytes); \
|
98 |
|
|
\
|
99 |
|
|
while (BytesLeft--) *Dest++ = c; \
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
/**
|
103 |
|
|
* A structure that contains a time stamp used by other time stamp macros
|
104 |
|
|
* defined below. This structure is processor dependent.
|
105 |
|
|
*/
|
106 |
|
|
typedef int XENV_TIME_STAMP;
|
107 |
|
|
|
108 |
|
|
/*****************************************************************************/
|
109 |
|
|
/**
|
110 |
|
|
*
|
111 |
|
|
* Time is derived from the 64 bit PPC timebase register
|
112 |
|
|
*
|
113 |
|
|
* @param StampPtr is the storage for the retrieved time stamp.
|
114 |
|
|
*
|
115 |
|
|
* @return None.
|
116 |
|
|
*
|
117 |
|
|
* @note
|
118 |
|
|
*
|
119 |
|
|
* Signature: void XENV_TIME_STAMP_GET(XTIME_STAMP *StampPtr)
|
120 |
|
|
* <br><br>
|
121 |
|
|
* This macro must be implemented by the user.
|
122 |
|
|
*
|
123 |
|
|
*****************************************************************************/
|
124 |
|
|
#define XENV_TIME_STAMP_GET(StampPtr)
|
125 |
|
|
|
126 |
|
|
/*****************************************************************************/
|
127 |
|
|
/**
|
128 |
|
|
*
|
129 |
|
|
* This macro is not yet implemented and always returns 0.
|
130 |
|
|
*
|
131 |
|
|
* @param Stamp1Ptr is the first sampled time stamp.
|
132 |
|
|
* @param Stamp2Ptr is the second sampled time stamp.
|
133 |
|
|
*
|
134 |
|
|
* @return 0
|
135 |
|
|
*
|
136 |
|
|
* @note
|
137 |
|
|
*
|
138 |
|
|
* This macro must be implemented by the user.
|
139 |
|
|
*
|
140 |
|
|
*****************************************************************************/
|
141 |
|
|
#define XENV_TIME_STAMP_DELTA_US(Stamp1Ptr, Stamp2Ptr) (0)
|
142 |
|
|
|
143 |
|
|
/*****************************************************************************/
|
144 |
|
|
/**
|
145 |
|
|
*
|
146 |
|
|
* This macro is not yet implemented and always returns 0.
|
147 |
|
|
*
|
148 |
|
|
* @param Stamp1Ptr is the first sampled time stamp.
|
149 |
|
|
* @param Stamp2Ptr is the second sampled time stamp.
|
150 |
|
|
*
|
151 |
|
|
* @return 0
|
152 |
|
|
*
|
153 |
|
|
* @note
|
154 |
|
|
*
|
155 |
|
|
* This macro must be implemented by the user.
|
156 |
|
|
*
|
157 |
|
|
*****************************************************************************/
|
158 |
|
|
#define XENV_TIME_STAMP_DELTA_MS(Stamp1Ptr, Stamp2Ptr) (0)
|
159 |
|
|
|
160 |
|
|
/*****************************************************************************/
|
161 |
|
|
/**
|
162 |
|
|
*
|
163 |
|
|
* XENV_USLEEP(unsigned delay)
|
164 |
|
|
*
|
165 |
|
|
* Delay the specified number of microseconds. Not implemented without OS
|
166 |
|
|
* support.
|
167 |
|
|
*
|
168 |
|
|
* @param delay is the number of microseconds to delay.
|
169 |
|
|
*
|
170 |
|
|
* @return None.
|
171 |
|
|
*
|
172 |
|
|
* @note None.
|
173 |
|
|
*
|
174 |
|
|
*****************************************************************************/
|
175 |
|
|
#define XENV_USLEEP(delay)
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
#endif /* end of protection macro */
|
179 |
|
|
|