/****************************************************************************** * * Copyright (C) 2002 - 2014 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * Use of the Software is limited solely to applications: * (a) running on a Xilinx device, or * (b) that interact with a Xilinx device through a bus or interconnect. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. * ******************************************************************************/ /*****************************************************************************/ /** * @file xversion.h * * This file contains the interface for the XVersion component. This * component represents a version ID. It is encapsulated within a component * so that it's type and implementation can change without affecting users of * it. * * The version is formatted as X.YYZ where X = 0 - 9, Y = 00 - 99, Z = a - z * X is the major revision, YY is the minor revision, and Z is the * compatability revision. * * Packed versions are also utilized for the configuration ROM such that * memory is minimized. A packed version consumes only 16 bits and is * formatted as follows. * *
* Revision                  Range       Bit Positions
*
* Major Revision            0 - 9       Bits 15 - 12
* Minor Revision            0 - 99      Bits 11 - 5
* Compatability Revision    a - z       Bits 4 - 0
*
* MODIFICATION HISTORY:
*
* Ver   Who    Date   Changes
* ----- ---- -------- -------------------------------------------------------
* 1.00a xd   11/03/04 Improved support for doxygen.
* 
* ******************************************************************************/ #ifndef XVERSION_H /* prevent circular inclusions */ #define XVERSION_H /* by using protection macros */ #ifdef __cplusplus extern "C" { #endif /***************************** Include Files *********************************/ #include "xbasic_types.h" #include "xstatus.h" /************************** Constant Definitions *****************************/ /**************************** Type Definitions *******************************/ /* the following data type is used to hold a null terminated version string * consisting of the following format, "X.YYX" */ typedef char XVersion[6]; /***************** Macros (Inline Functions) Definitions *********************/ /************************** Function Prototypes ******************************/ void XVersion_UnPack(XVersion *InstancePtr, u16 PackedVersion); int XVersion_Pack(XVersion *InstancePtr, u16 *PackedVersion); int XVersion_IsEqual(XVersion *InstancePtr, XVersion *VersionPtr); void XVersion_ToString(XVersion *InstancePtr, char *StringPtr); int XVersion_FromString(XVersion *InstancePtr, char *StringPtr); void XVersion_Copy(XVersion *InstancePtr, XVersion *VersionPtr); #ifdef __cplusplus } #endif #endif /* end of protection macro */