xversion.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. #ifndef XVERSION_H /* prevent circular inclusions */
  64. #define XVERSION_H /* by using protection macros */
  65. /***************************** Include Files *********************************/
  66. #include "xbasic_types.h"
  67. #include "xstatus.h"
  68. /************************** Constant Definitions *****************************/
  69. /**************************** Type Definitions *******************************/
  70. /* the following data type is used to hold a null terminated version string
  71. * consisting of the following format, "X.YYX"
  72. */
  73. typedef s8 XVersion[6];
  74. /***************** Macros (Inline Functions) Definitions *********************/
  75. /************************** Function Prototypes ******************************/
  76. void XVersion_UnPack(XVersion * InstancePtr, u16 PackedVersion);
  77. XStatus XVersion_Pack(XVersion * InstancePtr, u16 * PackedVersion);
  78. u32 XVersion_IsEqual(XVersion * InstancePtr, XVersion * VersionPtr);
  79. void XVersion_ToString(XVersion * InstancePtr, s8 * StringPtr);
  80. XStatus XVersion_FromString(XVersion * InstancePtr, s8 * StringPtr);
  81. void XVersion_Copy(XVersion * InstancePtr, XVersion * VersionPtr);
  82. #endif /* end of protection macro */