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