wdenk | 028ab6b | 2004-02-23 23:54:43 +0000 | [diff] [blame^] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Author: Xilinx, Inc. |
| 4 | * |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * option) any later version. |
| 10 | * |
| 11 | * |
| 12 | * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A |
| 13 | * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS |
| 14 | * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD, |
| 15 | * XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE |
| 16 | * FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING |
| 17 | * ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. |
| 18 | * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO |
| 19 | * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY |
| 20 | * WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM |
| 21 | * CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 22 | * FITNESS FOR A PARTICULAR PURPOSE. |
| 23 | * |
| 24 | * |
| 25 | * Xilinx hardware products are not intended for use in life support |
| 26 | * appliances, devices, or systems. Use in such applications is |
| 27 | * expressly prohibited. |
| 28 | * |
| 29 | * |
| 30 | * (c) Copyright 2002-2004 Xilinx Inc. |
| 31 | * All rights reserved. |
| 32 | * |
| 33 | * |
| 34 | * You should have received a copy of the GNU General Public License along |
| 35 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 36 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
| 37 | * |
| 38 | ******************************************************************************/ |
| 39 | /***************************************************************************** |
| 40 | * |
| 41 | * This file contains the interface for the XVersion component. This |
| 42 | * component represents a version ID. It is encapsulated within a component |
| 43 | * so that it's type and implementation can change without affecting users of |
| 44 | * it. |
| 45 | * |
| 46 | * The version is formatted as X.YYZ where X = 0 - 9, Y = 00 - 99, Z = a - z |
| 47 | * X is the major revision, YY is the minor revision, and Z is the |
| 48 | * compatability revision. |
| 49 | * |
| 50 | * Packed versions are also utilized for the configuration ROM such that |
| 51 | * memory is minimized. A packed version consumes only 16 bits and is |
| 52 | * formatted as follows. |
| 53 | * |
| 54 | * <pre> |
| 55 | * Revision Range Bit Positions |
| 56 | * |
| 57 | * Major Revision 0 - 9 Bits 15 - 12 |
| 58 | * Minor Revision 0 - 99 Bits 11 - 5 |
| 59 | * Compatability Revision a - z Bits 4 - 0 |
| 60 | * </pre> |
| 61 | * |
| 62 | ******************************************************************************/ |
| 63 | |
| 64 | #ifndef XVERSION_H /* prevent circular inclusions */ |
| 65 | #define XVERSION_H /* by using protection macros */ |
| 66 | |
| 67 | /***************************** Include Files *********************************/ |
| 68 | |
| 69 | #include "xbasic_types.h" |
| 70 | #include "xstatus.h" |
| 71 | |
| 72 | /************************** Constant Definitions *****************************/ |
| 73 | |
| 74 | /**************************** Type Definitions *******************************/ |
| 75 | |
| 76 | /* the following data type is used to hold a null terminated version string |
| 77 | * consisting of the following format, "X.YYX" |
| 78 | */ |
| 79 | typedef s8 XVersion[6]; |
| 80 | |
| 81 | /***************** Macros (Inline Functions) Definitions *********************/ |
| 82 | |
| 83 | /************************** Function Prototypes ******************************/ |
| 84 | |
| 85 | void XVersion_UnPack(XVersion * InstancePtr, u16 PackedVersion); |
| 86 | |
| 87 | XStatus XVersion_Pack(XVersion * InstancePtr, u16 * PackedVersion); |
| 88 | |
| 89 | u32 XVersion_IsEqual(XVersion * InstancePtr, XVersion * VersionPtr); |
| 90 | |
| 91 | void XVersion_ToString(XVersion * InstancePtr, s8 * StringPtr); |
| 92 | |
| 93 | XStatus XVersion_FromString(XVersion * InstancePtr, s8 * StringPtr); |
| 94 | |
| 95 | void XVersion_Copy(XVersion * InstancePtr, XVersion * VersionPtr); |
| 96 | |
| 97 | #endif /* end of protection macro */ |