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 /******************************************************************************/
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.
44 * MODIFICATION HISTORY:
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.
57 ******************************************************************************/
59 #ifndef XEMACLITE_I_H /* prevent circular inclusions */
60 #define XEMACLITE_I_H /* by using protection macros */
67 /***************************** Include Files *********************************/
69 #include "xemaclite.h"
71 /************************** Constant Definitions ****************************/
73 /**************************** Type Definitions *******************************/
75 /***************** Macros (Inline Functions) Definitions *********************/
77 /****************************************************************************/
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.
87 * @param BaseAddress is the base address of the device
89 * @return Contents of active bit in register.
91 * @note C-Style signature:
92 * u32 XEmacLite_GetTxActive(u32 BaseAddress)
94 *****************************************************************************/
95 #define XEmacLite_GetTxActive(BaseAddress) \
96 (XEmacLite_ReadReg((BaseAddress), XEL_TSR_OFFSET))
98 /****************************************************************************/
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.
108 * @param BaseAddress is the base address of the device
109 * @param Mask is the data to be written
113 * @note C-Style signature:
114 * void XEmacLite_SetTxActive(u32 BaseAddress, u32 Mask)
116 *****************************************************************************/
117 #define XEmacLite_SetTxActive(BaseAddress, Mask) \
118 (XEmacLite_WriteReg((BaseAddress), XEL_TSR_OFFSET, (Mask)))
120 /************************** Variable Definitions ****************************/
122 extern XEmacLite_Config XEmacLite_ConfigTable[];
124 /************************** Function Prototypes ******************************/
126 void XEmacLite_AlignedWrite(void *SrcPtr, u32 *DestPtr, unsigned ByteCount);
127 void XEmacLite_AlignedRead(u32 *SrcPtr, void *DestPtr, unsigned ByteCount);
129 void StubHandler(void *CallBackRef);
136 #endif /* end of protection macro */