![]() |
|
|||
File indexing completed on 2025-05-11 08:22:44
0001 /** 0002 * @file 0003 * 0004 * @ingroup RTEMSBSPsARMCycVContrib 0005 */ 0006 0007 /****************************************************************************** 0008 * 0009 * Copyright 2013 Altera Corporation. All Rights Reserved. 0010 * 0011 * Redistribution and use in source and binary forms, with or without 0012 * modification, are permitted provided that the following conditions are met: 0013 * 0014 * 1. Redistributions of source code must retain the above copyright notice, 0015 * this list of conditions and the following disclaimer. 0016 * 0017 * 2. Redistributions in binary form must reproduce the above copyright notice, 0018 * this list of conditions and the following disclaimer in the documentation 0019 * and/or other materials provided with the distribution. 0020 * 0021 * 3. The name of the author may not be used to endorse or promote products 0022 * derived from this software without specific prior written permission. 0023 * 0024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR 0025 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 0026 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO 0027 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0028 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 0029 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0030 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0031 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 0032 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 0033 * OF SUCH DAMAGE. 0034 * 0035 ******************************************************************************/ 0036 0037 #ifndef __HWLIB_H__ 0038 #define __HWLIB_H__ 0039 0040 #ifdef __cplusplus 0041 #include <cstddef> 0042 #include <cstdbool> 0043 #include <cstdint> 0044 #else /* __cplusplus */ 0045 #include <stddef.h> 0046 #include <stdbool.h> 0047 #include <stdint.h> 0048 #endif /* __cplusplus */ 0049 0050 #include "alt_hwlibs_ver.h" 0051 0052 #ifdef __cplusplus 0053 extern "C" 0054 { 0055 #endif /* __cplusplus */ 0056 0057 /*! 0058 * The type definition for status codes returned by the HWLIB. 0059 */ 0060 typedef int32_t ALT_STATUS_CODE; 0061 0062 /*! Definitions of status codes returned by the HWLIB. */ 0063 0064 /*! The operation was successful. */ 0065 #define ALT_E_SUCCESS 0 0066 0067 /*! The operation failed. */ 0068 #define ALT_E_ERROR (-1) 0069 /*! FPGA configuration error detected.*/ 0070 #define ALT_E_FPGA_CFG (-2) 0071 /*! FPGA CRC error detected. */ 0072 #define ALT_E_FPGA_CRC (-3) 0073 /*! An error occurred on the FPGA configuration bitstream input source. */ 0074 #define ALT_E_FPGA_CFG_STM (-4) 0075 /*! The FPGA is powered off. */ 0076 #define ALT_E_FPGA_PWR_OFF (-5) 0077 /*! The SoC does not currently control the FPGA. */ 0078 #define ALT_E_FPGA_NO_SOC_CTRL (-6) 0079 /*! The FPGA is not in USER mode. */ 0080 #define ALT_E_FPGA_NOT_USER_MODE (-7) 0081 /*! An argument violates a range constraint. */ 0082 #define ALT_E_ARG_RANGE (-8) 0083 /*! A bad argument value was passed. */ 0084 #define ALT_E_BAD_ARG (-9) 0085 /*! The operation is invalid or illegal. */ 0086 #define ALT_E_BAD_OPERATION (-10) 0087 /*! An invalid option was selected. */ 0088 #define ALT_E_INV_OPTION (-11) 0089 /*! An operation or response timeout period expired. */ 0090 #define ALT_E_TMO (-12) 0091 /*! The argument value is reserved or unavailable. */ 0092 #define ALT_E_RESERVED (-13) 0093 /*! A clock is not enabled or violates an operational constraint. */ 0094 #define ALT_E_BAD_CLK (-14) 0095 /*! The version ID is invalid. */ 0096 #define ALT_E_BAD_VERSION (-15) 0097 /*! The buffer does not contain enough free space for the operation. */ 0098 #define ALT_E_BUF_OVF (-20) 0099 0100 /*! 0101 * Indicates a FALSE condition. 0102 */ 0103 #define ALT_E_FALSE (0) 0104 /*! 0105 * Indicates a TRUE condition. 0106 */ 0107 #define ALT_E_TRUE (1) 0108 0109 /* Note, additional positive status codes may be defined to return 0110 * a TRUE condition with additional information */ 0111 0112 0113 /* Some other useful definitions */ 0114 0115 /*! 0116 * Specifies the current major and minor revision of the HWLibs. The 0117 * MS four decimal digits specify the Altera ACDS release number, the 0118 * LS two decimal digits specify minor revisions of the HWLibs, if any. 0119 * 0120 * A typical use is: 0121 * \code 0122 * #if ALTERA_HWLIBS_VERSION_CODE >= ALT_HWLIBS_VERSION(13, 1, 0) 0123 * \endcode 0124 * for a dependency on the major or minor ACDS revision 0125 * or 0126 * \code 0127 * #if ALTERA_HWLIBS_VERSION_CODE == ALT_HWLIBS_VERSION(13, 0, 12) 0128 * \endcode 0129 * for a dependency on the hwlibs revision 0130 * 0131 */ 0132 #define ALT_HWLIBS_VERSION(a,b,c) (((a)*10000)+((b)*100)+(c)) 0133 0134 #define ALTERA_HWLIBS_VERSION_CODE ALT_HWLIBS_VERSION(ALTERA_ACDS_MAJOR_REV, \ 0135 ALTERA_ACDS_MINOR_REV, ALTERA_HWLIBS_REV) 0136 0137 /*! 0138 * Allow some parts of the documentation to be hidden by setting to zero 0139 */ 0140 #define ALTERA_INTERNAL_ONLY_DOCS 1 0141 0142 0143 /*! 0144 * Provide base address of MPU address space 0145 */ 0146 0147 #ifndef ALT_HPS_ADDR 0148 #define ALT_HPS_ADDR 0 0149 #endif 0150 0151 /*! 0152 * These constants are sometimes useful: 0153 */ 0154 #define ALT_MILLISECS_IN_A_SEC 1000 0155 #define ALT_MICROSECS_IN_A_SEC 1000000 0156 #define ALT_NANOSECS_IN_A_SEC 1000000000 0157 0158 #define ALT_TWO_TO_POW0 (1) 0159 #define ALT_TWO_TO_POW1 (1<<1) 0160 #define ALT_TWO_TO_POW2 (1<<2) 0161 #define ALT_TWO_TO_POW3 (1<<3) 0162 #define ALT_TWO_TO_POW4 (1<<4) 0163 #define ALT_TWO_TO_POW5 (1<<5) 0164 #define ALT_TWO_TO_POW6 (1<<6) 0165 #define ALT_TWO_TO_POW7 (1<<7) 0166 #define ALT_TWO_TO_POW8 (1<<8) 0167 #define ALT_TWO_TO_POW9 (1<<9) 0168 #define ALT_TWO_TO_POW10 (1<<10) 0169 #define ALT_TWO_TO_POW11 (1<<11) 0170 #define ALT_TWO_TO_POW12 (1<<12) 0171 #define ALT_TWO_TO_POW13 (1<<13) 0172 #define ALT_TWO_TO_POW14 (1<<14) 0173 #define ALT_TWO_TO_POW15 (1<<15) 0174 #define ALT_TWO_TO_POW16 (1<<16) 0175 #define ALT_TWO_TO_POW17 (1<<17) 0176 #define ALT_TWO_TO_POW18 (1<<18) 0177 #define ALT_TWO_TO_POW19 (1<<19) 0178 #define ALT_TWO_TO_POW20 (1<<20) 0179 #define ALT_TWO_TO_POW21 (1<<21) 0180 #define ALT_TWO_TO_POW22 (1<<22) 0181 #define ALT_TWO_TO_POW23 (1<<23) 0182 #define ALT_TWO_TO_POW24 (1<<24) 0183 #define ALT_TWO_TO_POW25 (1<<25) 0184 #define ALT_TWO_TO_POW26 (1<<26) 0185 #define ALT_TWO_TO_POW27 (1<<27) 0186 #define ALT_TWO_TO_POW28 (1<<28) 0187 #define ALT_TWO_TO_POW29 (1<<29) 0188 #define ALT_TWO_TO_POW30 (1<<30) 0189 #define ALT_TWO_TO_POW31 (1<<31) 0190 0191 #ifdef __cplusplus 0192 } 0193 #endif /* __cplusplus */ 0194 #endif /* __HWLIB_H__ */ 0195
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |