]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/libsrc/emaclite_v4_2/src/xemaclite_i.h
Update the Microblaze hardware design and BSP to the latest IP and tool versions.
[freertos] / FreeRTOS / Demo / MicroBlaze_Kintex7_EthernetLite / BSP / microblaze_0 / libsrc / emaclite_v4_2 / src / xemaclite_i.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2004 - 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 * @file xemaclite_i.h
35 * @addtogroup emaclite_v4_1
36 * @{
37 *
38 * This header file contains internal identifiers, which are those shared
39 * between the files of the driver. It is intended for internal use only.
40 *
41 * NOTES:
42 *
43 * None.
44 *
45 * <pre>
46 * MODIFICATION HISTORY:
47 *
48 * Ver   Who  Date     Changes
49 * ----- ---- -------- -----------------------------------------------
50 * 1.01a ecm  05/21/04 First release
51 * 1.11a mta  03/21/07 Updated to new coding style
52 * 1.13a sv   02/1/08  Added macros to Get/Set Tx/Rx status
53 * 3.00a ktn  10/22/09 The macros have been renamed to remove _m from the name.
54 *                     The macros changed in this file are
55 *                     XEmacLite_mGetTxActive changed to XEmacLite_GetTxActive,
56 *                     XEmacLite_mSetTxActive changed to XEmacLite_SetTxActive.
57 *
58 * </pre>
59 ******************************************************************************/
60
61 #ifndef XEMACLITE_I_H           /* prevent circular inclusions */
62 #define XEMACLITE_I_H           /* by using protection macros */
63
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67
68
69 /***************************** Include Files *********************************/
70
71 #include "xemaclite.h"
72
73 /************************** Constant Definitions ****************************/
74
75 /**************************** Type Definitions *******************************/
76
77 /***************** Macros (Inline Functions) Definitions *********************/
78
79 /****************************************************************************/
80 /**
81 *
82 * Get the TX active location to check status. This is used to check if
83 * the TX buffer is currently active. There isn't any way in the hardware
84 * to implement this but the register is fully populated so the driver can
85 * set the bit in the send routine and the ISR can clear the bit when
86 * the handler is complete. This mimics the correct operation of the hardware
87 * if it was possible to do this in hardware.
88 *
89 * @param        BaseAddress is the base address of the device
90 *
91 * @return       Contents of active bit in register.
92 *
93 * @note         C-Style signature:
94 *               u32 XEmacLite_GetTxActive(u32 BaseAddress)
95 *
96 *****************************************************************************/
97 #define XEmacLite_GetTxActive(BaseAddress)                      \
98                  (XEmacLite_ReadReg((BaseAddress), XEL_TSR_OFFSET))
99
100 /****************************************************************************/
101 /**
102 *
103 * Set the TX active location to update status. This is used to set the bit
104 * indicating which TX buffer is currently active. There isn't any way in the
105 * hardware to implement this but the register is fully populated so the driver
106 * can set the bit in the send routine and the ISR can clear the bit when
107 * the handler is complete. This mimics the correct operation of the hardware
108 * if it was possible to do this in hardware.
109 *
110 * @param        BaseAddress is the base address of the device
111 * @param        Mask is the data to be written
112 *
113 * @return       None
114 *
115 * @note         C-Style signature:
116 *               void XEmacLite_SetTxActive(u32 BaseAddress, u32 Mask)
117 *
118 *****************************************************************************/
119 #define XEmacLite_SetTxActive(BaseAddress, Mask)                \
120         (XEmacLite_WriteReg((BaseAddress), XEL_TSR_OFFSET, (Mask)))
121
122 /************************** Variable Definitions ****************************/
123
124 extern XEmacLite_Config XEmacLite_ConfigTable[];
125
126 /************************** Function Prototypes ******************************/
127
128 void XEmacLite_AlignedWrite(void *SrcPtr, UINTPTR *DestPtr, unsigned ByteCount);
129 void XEmacLite_AlignedRead(UINTPTR *SrcPtr, void *DestPtr, unsigned ByteCount);
130
131 void StubHandler(void *CallBackRef);
132
133
134 #ifdef __cplusplus
135 }
136 #endif
137
138 #endif /* end of protection macro */
139 /** @} */