1 /******************************************************************************
3 * Copyright (C) 2004 - 2014 Xilinx, Inc. All rights reserved.
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:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
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.
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
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.
31 ******************************************************************************/
32 /******************************************************************************/
35 * @addtogroup emaclite_v4_1
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.
46 * MODIFICATION HISTORY:
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.
59 ******************************************************************************/
61 #ifndef XEMACLITE_I_H /* prevent circular inclusions */
62 #define XEMACLITE_I_H /* by using protection macros */
69 /***************************** Include Files *********************************/
71 #include "xemaclite.h"
73 /************************** Constant Definitions ****************************/
75 /**************************** Type Definitions *******************************/
77 /***************** Macros (Inline Functions) Definitions *********************/
79 /****************************************************************************/
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.
89 * @param BaseAddress is the base address of the device
91 * @return Contents of active bit in register.
93 * @note C-Style signature:
94 * u32 XEmacLite_GetTxActive(u32 BaseAddress)
96 *****************************************************************************/
97 #define XEmacLite_GetTxActive(BaseAddress) \
98 (XEmacLite_ReadReg((BaseAddress), XEL_TSR_OFFSET))
100 /****************************************************************************/
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.
110 * @param BaseAddress is the base address of the device
111 * @param Mask is the data to be written
115 * @note C-Style signature:
116 * void XEmacLite_SetTxActive(u32 BaseAddress, u32 Mask)
118 *****************************************************************************/
119 #define XEmacLite_SetTxActive(BaseAddress, Mask) \
120 (XEmacLite_WriteReg((BaseAddress), XEL_TSR_OFFSET, (Mask)))
122 /************************** Variable Definitions ****************************/
124 extern XEmacLite_Config XEmacLite_ConfigTable[];
126 /************************** Function Prototypes ******************************/
128 void XEmacLite_AlignedWrite(void *SrcPtr, UINTPTR *DestPtr, unsigned ByteCount);
129 void XEmacLite_AlignedRead(UINTPTR *SrcPtr, void *DestPtr, unsigned ByteCount);
131 void StubHandler(void *CallBackRef);
138 #endif /* end of protection macro */