WPILib 2012
WPILibRoboticsLibraryforFRC
ChipObject/NiFpga.h
00001 /*
00002  * FPGA Interface C API 2.0 header file.
00003  *
00004  * Copyright (c) 2011,
00005  * National Instruments Corporation.
00006  * All rights reserved.
00007  */
00008 
00009 #ifndef __NiFpga_h__
00010 #define __NiFpga_h__
00011 
00012 /*
00013  * Determine platform details.
00014  */
00015 #if defined(_M_IX86) \
00016  || defined(_M_X64) \
00017  || defined(i386) \
00018  || defined(__i386__) \
00019  || defined(__amd64__) \
00020  || defined(__amd64) \
00021  || defined(__x86_64__) \
00022  || defined(__x86_64) \
00023  || defined(__i386) \
00024  || defined(_X86_) \
00025  || defined(__THW_INTEL__) \
00026  || defined(__I86__) \
00027  || defined(__INTEL__) \
00028  || defined(__X86__) \
00029  || defined(__386__) \
00030  || defined(__I86__) \
00031  || defined(M_I386) \
00032  || defined(M_I86) \
00033  || defined(_M_I386) \
00034  || defined(_M_I86)
00035    #if defined(_WIN32) \
00036     || defined(_WIN64) \
00037     || defined(__WIN32__) \
00038     || defined(__TOS_WIN__) \
00039     || defined(__WINDOWS__) \
00040     || defined(_WINDOWS) \
00041     || defined(__WINDOWS_386__) \
00042     || defined(__CYGWIN__)
00043       /* Either Windows or Phar Lap ETS. */
00044       #define NiFpga_Windows 1
00045    #elif defined(__linux) \
00046       || defined(__linux__) \
00047       || defined(__gnu_linux__) \
00048       || defined(linux)
00049       #define NiFpga_Linux 1
00050    #else
00051       #error Unsupported OS.
00052    #endif
00053 #elif defined(__powerpc) \
00054    || defined(__powerpc__) \
00055    || defined(__POWERPC__) \
00056    || defined(__ppc__) \
00057    || defined(__PPC) \
00058    || defined(_M_PPC) \
00059    || defined(_ARCH_PPC) \
00060    || defined(__PPC__) \
00061    || defined(__ppc)
00062    #if defined(__vxworks)
00063       #define NiFpga_VxWorks 1
00064    #else
00065       #error Unsupported OS.
00066    #endif
00067 #else
00068    #error Unsupported architecture.
00069 #endif
00070 
00071 /*
00072  * Determine compiler.
00073  */
00074 #if defined(_MSC_VER)
00075    #define NiFpga_Msvc 1
00076 #elif defined(__GNUC__)
00077    #define NiFpga_Gcc 1
00078 #elif defined(_CVI_) && !defined(_TPC_)
00079    #define NiFpga_Cvi 1
00080    /* Enables CVI Library Protection Errors. */
00081    #pragma EnableLibraryRuntimeChecking
00082 #else
00083    /* Unknown compiler. */
00084 #endif
00085 
00086 /*
00087  * Determine compliance with different C/C++ language standards.
00088  */
00089 #if defined(__cplusplus)
00090    #define NiFpga_Cpp 1
00091    #if __cplusplus >= 199707L
00092       #define NiFpga_Cpp98 1
00093    #endif
00094 #endif
00095 #if defined(__STDC__)
00096    #define NiFpga_C89 1
00097    #if defined(__STDC_VERSION__)
00098       #define NiFpga_C90 1
00099       #if __STDC_VERSION__ >= 199409L
00100          #define NiFpga_C94 1
00101          #if __STDC_VERSION__ >= 199901L
00102             #define NiFpga_C99 1
00103          #endif
00104       #endif
00105    #endif
00106 #endif
00107 
00108 /*
00109  * Determine ability to inline functions.
00110  */
00111 #if NiFpga_Cpp || NiFpga_C99
00112    /* The inline keyword exists in C++ and C99. */
00113    #define NiFpga_Inline inline
00114 #elif NiFpga_Msvc
00115    /* Visual C++ (at least since 6.0) also supports an alternate keyword. */
00116    #define NiFpga_Inline __inline
00117 #elif NiFpga_Gcc
00118    /* GCC (at least since 2.95.2) also supports an alternate keyword. */
00119    #define NiFpga_Inline __inline__
00120 #elif !defined(NiFpga_Inline)
00121    /*
00122     * Disable inlining if inline support is unknown. To manually enable
00123     * inlining, #define the following macro before #including NiFpga.h:
00124     *
00125     *    #define NiFpga_Inline inline
00126     */
00127    #define NiFpga_Inline
00128 #endif
00129 
00130 /*
00131  * Define exact-width integer types, if they have not already been defined.
00132  */
00133 #if NiFpga_ExactWidthIntegerTypesDefined \
00134  || defined(_STDINT) \
00135  || defined(_STDINT_H) \
00136  || defined(_STDINT_H_) \
00137  || defined(_INTTYPES_H) \
00138  || defined(_INTTYPES_H_) \
00139  || defined(_SYS_STDINT_H) \
00140  || defined(_SYS_STDINT_H_) \
00141  || defined(_SYS_INTTYPES_H) \
00142  || defined(_SYS_INTTYPES_H_) \
00143  || defined(_STDINT_H_INCLUDED) \
00144  || defined(BOOST_CSTDINT_HPP) \
00145  || defined(_MSC_STDINT_H_) \
00146  || defined(_PSTDINT_H_INCLUDED)
00147    /* Assume that exact-width integer types have already been defined. */
00148 #elif NiFpga_VxWorks
00149    #include <vxWorks.h>
00150 #elif NiFpga_C99 \
00151    || NiFpga_Gcc /* GCC (at least since 3.0) has a stdint.h. */ \
00152    || defined(HAVE_STDINT_H)
00153    /* Assume that stdint.h can be included. */
00154    #include <stdint.h>
00155 #elif NiFpga_Msvc \
00156    || NiFpga_Cvi
00157    /* Manually define exact-width integer types. */
00158    typedef   signed    char  int8_t;
00159    typedef unsigned    char uint8_t;
00160    typedef            short  int16_t;
00161    typedef unsigned   short uint16_t;
00162    typedef              int  int32_t;
00163    typedef unsigned     int uint32_t;
00164    typedef          __int64  int64_t;
00165    typedef unsigned __int64 uint64_t;
00166 #else
00167    /*
00168     * Exact-width integer types must be defined by the user, and the following
00169     * macro must be #defined, before #including NiFpga.h:
00170     *
00171     *    #define NiFpga_ExactWidthIntegerTypesDefined 1
00172     */
00173    #error Exact-width integer types must be defined by the user. See comment.
00174 #endif
00175 
00176 /* Included for definition of size_t. */
00177 #include <stddef.h>
00178 
00179 #if NiFpga_Cpp
00180 extern "C" {
00181 #endif
00182 
00186 typedef uint8_t NiFpga_Bool;
00187 
00191 static const NiFpga_Bool NiFpga_False = 0;
00192 
00196 static const NiFpga_Bool NiFpga_True = 1;
00197 
00202 typedef int32_t NiFpga_Status;
00203 
00207 static const NiFpga_Status NiFpga_Status_Success = 0;
00208 
00212 static const NiFpga_Status NiFpga_Status_FifoTimeout = -50400;
00213 
00217 static const NiFpga_Status NiFpga_Status_MemoryFull = -52000;
00218 
00222 static const NiFpga_Status NiFpga_Status_SoftwareFault = -52003;
00223 
00228 static const NiFpga_Status NiFpga_Status_InvalidParameter = -52005;
00229 
00235 static const NiFpga_Status NiFpga_Status_ResourceNotFound = -52006;
00236 
00242 static const NiFpga_Status NiFpga_Status_ResourceNotInitialized = -52010;
00243 
00247 static const NiFpga_Status NiFpga_Status_FpgaAlreadyRunning = -61003;
00248 
00252 static const NiFpga_Status NiFpga_Status_DeviceTypeMismatch = -61024;
00253 
00258 static const NiFpga_Status NiFpga_Status_CommunicationTimeout = -61046;
00259 
00263 static const NiFpga_Status NiFpga_Status_IrqTimeout = -61060;
00264 
00268 static const NiFpga_Status NiFpga_Status_CorruptBitfile = -61070;
00269 
00275 static const NiFpga_Status NiFpga_Status_BadDepth = -61072;
00276 
00282 static const NiFpga_Status NiFpga_Status_BadReadWriteCount = -61073;
00283 
00295 static const NiFpga_Status NiFpga_Status_ClockLostLock = -61083;
00296 
00301 static const NiFpga_Status NiFpga_Status_FpgaBusy = -61141;
00302 
00308 static const NiFpga_Status NiFpga_Status_FpgaBusyFpgaInterfaceCApi = -61200;
00309 
00315 static const NiFpga_Status NiFpga_Status_FpgaBusyScanInterface = -61201;
00316 
00322 static const NiFpga_Status NiFpga_Status_FpgaBusyFpgaInterface = -61202;
00323 
00329 static const NiFpga_Status NiFpga_Status_FpgaBusyInteractive = -61203;
00330 
00336 static const NiFpga_Status NiFpga_Status_FpgaBusyEmulation = -61204;
00337 
00341 static const NiFpga_Status NiFpga_Status_InternalError = -61499;
00342 
00347 static const NiFpga_Status NiFpga_Status_AccessDenied = -63033;
00348 
00354 static const NiFpga_Status NiFpga_Status_RpcConnectionError = -63040;
00355 
00360 static const NiFpga_Status NiFpga_Status_RpcSessionError = -63043;
00361 
00367 static const NiFpga_Status NiFpga_Status_FifoElementsCurrentlyAcquired = -63083;
00368 
00372 static const NiFpga_Status NiFpga_Status_BitfileReadError = -63101;
00373 
00379 static const NiFpga_Status NiFpga_Status_SignatureMismatch = -63106;
00380 
00386 static const NiFpga_Status NiFpga_Status_InvalidResourceName = -63192;
00387 
00391 static const NiFpga_Status NiFpga_Status_FeatureNotSupported = -63193;
00392 
00397 static const NiFpga_Status NiFpga_Status_VersionMismatch = -63194;
00398 
00402 static const NiFpga_Status NiFpga_Status_InvalidSession = -63195;
00403 
00408 static const NiFpga_Status NiFpga_Status_OutOfHandles = -63198;
00409 
00416 static NiFpga_Inline NiFpga_Bool NiFpga_IsError(const NiFpga_Status status)
00417 {
00418    return status < NiFpga_Status_Success;
00419 }
00420 
00427 static NiFpga_Inline NiFpga_Bool NiFpga_IsNotError(const NiFpga_Status status)
00428 {
00429    return status >= NiFpga_Status_Success;
00430 }
00431 
00443 static NiFpga_Inline NiFpga_Status NiFpga_MergeStatus(
00444                                                 NiFpga_Status* const status,
00445                                                 const NiFpga_Status  newStatus)
00446 {
00447    if (!status)
00448    {
00449       return NiFpga_Status_InvalidParameter;
00450    }
00451    if (NiFpga_IsNotError(*status)
00452    &&  (*status == NiFpga_Status_Success || NiFpga_IsError(newStatus)))
00453    {
00454       *status = newStatus;
00455    }
00456    return *status;
00457 }
00458 
00477 #define NiFpga_IfIsNotError(status, expression) \
00478    if (NiFpga_IsNotError(status)) \
00479    { \
00480       NiFpga_MergeStatus(&status, (expression)); \
00481    }
00482 
00493 NiFpga_Status NiFpga_Initialize(void);
00494 
00503 NiFpga_Status NiFpga_Finalize(void);
00504 
00508 typedef uint32_t NiFpga_Session;
00509 
00513 typedef enum
00514 {
00515    NiFpga_OpenAttribute_NoRun = 1
00516 } NiFpga_OpenAttribute;
00517 
00543 NiFpga_Status NiFpga_Open(const char*     bitfile,
00544                           const char*     signature,
00545                           const char*     resource,
00546                           uint32_t        attribute,
00547                           NiFpga_Session* session);
00548 
00552 typedef enum
00553 {
00554    NiFpga_CloseAttribute_NoResetIfLastSession = 1
00555 } NiFpga_CloseAttribute;
00556 
00566 NiFpga_Status NiFpga_Close(NiFpga_Session session,
00567                            uint32_t       attribute);
00568 
00572 typedef enum
00573 {
00574    NiFpga_RunAttribute_WaitUntilDone = 1
00575 } NiFpga_RunAttribute;
00576 
00585 NiFpga_Status NiFpga_Run(NiFpga_Session session,
00586                          uint32_t       attribute);
00587 
00594 NiFpga_Status NiFpga_Abort(NiFpga_Session session);
00595 
00602 NiFpga_Status NiFpga_Reset(NiFpga_Session session);
00603 
00610 NiFpga_Status NiFpga_Download(NiFpga_Session session);
00611 
00620 NiFpga_Status NiFpga_ReadBool(NiFpga_Session session,
00621                               uint32_t       indicator,
00622                               NiFpga_Bool*   value);
00623 
00632 NiFpga_Status NiFpga_ReadI8(NiFpga_Session session,
00633                             uint32_t       indicator,
00634                             int8_t*        value);
00635 
00644 NiFpga_Status NiFpga_ReadU8(NiFpga_Session session,
00645                             uint32_t       indicator,
00646                             uint8_t*       value);
00647 
00656 NiFpga_Status NiFpga_ReadI16(NiFpga_Session session,
00657                              uint32_t       indicator,
00658                              int16_t*       value);
00659 
00668 NiFpga_Status NiFpga_ReadU16(NiFpga_Session session,
00669                              uint32_t       indicator,
00670                              uint16_t*      value);
00671 
00680 NiFpga_Status NiFpga_ReadI32(NiFpga_Session session,
00681                              uint32_t       indicator,
00682                              int32_t*       value);
00683 
00692 NiFpga_Status NiFpga_ReadU32(NiFpga_Session session,
00693                              uint32_t       indicator,
00694                              uint32_t*      value);
00695 
00704 NiFpga_Status NiFpga_ReadI64(NiFpga_Session session,
00705                              uint32_t       indicator,
00706                              int64_t*       value);
00707 
00716 NiFpga_Status NiFpga_ReadU64(NiFpga_Session session,
00717                              uint32_t       indicator,
00718                              uint64_t*      value);
00719 
00728 NiFpga_Status NiFpga_WriteBool(NiFpga_Session session,
00729                                uint32_t       control,
00730                                NiFpga_Bool    value);
00731 
00740 NiFpga_Status NiFpga_WriteI8(NiFpga_Session session,
00741                              uint32_t       control,
00742                              int8_t         value);
00743 
00752 NiFpga_Status NiFpga_WriteU8(NiFpga_Session session,
00753                              uint32_t       control,
00754                              uint8_t        value);
00755 
00764 NiFpga_Status NiFpga_WriteI16(NiFpga_Session session,
00765                               uint32_t       control,
00766                               int16_t        value);
00767 
00776 NiFpga_Status NiFpga_WriteU16(NiFpga_Session session,
00777                               uint32_t       control,
00778                               uint16_t       value);
00779 
00788 NiFpga_Status NiFpga_WriteI32(NiFpga_Session session,
00789                               uint32_t       control,
00790                               int32_t        value);
00791 
00800 NiFpga_Status NiFpga_WriteU32(NiFpga_Session session,
00801                               uint32_t       control,
00802                               uint32_t       value);
00803 
00812 NiFpga_Status NiFpga_WriteI64(NiFpga_Session session,
00813                               uint32_t       control,
00814                               int64_t        value);
00815 
00824 NiFpga_Status NiFpga_WriteU64(NiFpga_Session session,
00825                               uint32_t       control,
00826                               uint64_t       value);
00827 
00841 NiFpga_Status NiFpga_ReadArrayBool(NiFpga_Session session,
00842                                    uint32_t       indicator,
00843                                    NiFpga_Bool*   array,
00844                                    size_t         size);
00845 
00859 NiFpga_Status NiFpga_ReadArrayI8(NiFpga_Session session,
00860                                  uint32_t       indicator,
00861                                  int8_t*        array,
00862                                  size_t         size);
00863 
00877 NiFpga_Status NiFpga_ReadArrayU8(NiFpga_Session session,
00878                                  uint32_t       indicator,
00879                                  uint8_t*       array,
00880                                  size_t         size);
00881 
00895 NiFpga_Status NiFpga_ReadArrayI16(NiFpga_Session session,
00896                                   uint32_t       indicator,
00897                                   int16_t*       array,
00898                                   size_t         size);
00899 
00913 NiFpga_Status NiFpga_ReadArrayU16(NiFpga_Session session,
00914                                   uint32_t       indicator,
00915                                   uint16_t*      array,
00916                                   size_t         size);
00917 
00931 NiFpga_Status NiFpga_ReadArrayI32(NiFpga_Session session,
00932                                   uint32_t       indicator,
00933                                   int32_t*       array,
00934                                   size_t         size);
00935 
00949 NiFpga_Status NiFpga_ReadArrayU32(NiFpga_Session session,
00950                                   uint32_t       indicator,
00951                                   uint32_t*      array,
00952                                   size_t         size);
00953 
00967 NiFpga_Status NiFpga_ReadArrayI64(NiFpga_Session session,
00968                                   uint32_t       indicator,
00969                                   int64_t*       array,
00970                                   size_t         size);
00971 
00985 NiFpga_Status NiFpga_ReadArrayU64(NiFpga_Session session,
00986                                   uint32_t       indicator,
00987                                   uint64_t*      array,
00988                                   size_t         size);
00989 
01003 NiFpga_Status NiFpga_WriteArrayBool(NiFpga_Session     session,
01004                                     uint32_t           control,
01005                                     const NiFpga_Bool* array,
01006                                     size_t             size);
01007 
01021 NiFpga_Status NiFpga_WriteArrayI8(NiFpga_Session session,
01022                                   uint32_t       control,
01023                                   const int8_t*  array,
01024                                   size_t         size);
01025 
01039 NiFpga_Status NiFpga_WriteArrayU8(NiFpga_Session session,
01040                                   uint32_t       control,
01041                                   const uint8_t* array,
01042                                   size_t         size);
01043 
01057 NiFpga_Status NiFpga_WriteArrayI16(NiFpga_Session session,
01058                                    uint32_t       control,
01059                                    const int16_t* array,
01060                                    size_t         size);
01061 
01075 NiFpga_Status NiFpga_WriteArrayU16(NiFpga_Session  session,
01076                                    uint32_t        control,
01077                                    const uint16_t* array,
01078                                    size_t          size);
01079 
01093 NiFpga_Status NiFpga_WriteArrayI32(NiFpga_Session session,
01094                                    uint32_t       control,
01095                                    const int32_t* array,
01096                                    size_t         size);
01097 
01111 NiFpga_Status NiFpga_WriteArrayU32(NiFpga_Session  session,
01112                                    uint32_t        control,
01113                                    const uint32_t* array,
01114                                    size_t          size);
01115 
01129 NiFpga_Status NiFpga_WriteArrayI64(NiFpga_Session session,
01130                                    uint32_t       control,
01131                                    const int64_t* array,
01132                                    size_t         size);
01133 
01147 NiFpga_Status NiFpga_WriteArrayU64(NiFpga_Session  session,
01148                                    uint32_t        control,
01149                                    const uint64_t* array,
01150                                    size_t          size);
01151 
01158 typedef enum
01159 {
01160    NiFpga_Irq_0  = 1 << 0,
01161    NiFpga_Irq_1  = 1 << 1,
01162    NiFpga_Irq_2  = 1 << 2,
01163    NiFpga_Irq_3  = 1 << 3,
01164    NiFpga_Irq_4  = 1 << 4,
01165    NiFpga_Irq_5  = 1 << 5,
01166    NiFpga_Irq_6  = 1 << 6,
01167    NiFpga_Irq_7  = 1 << 7,
01168    NiFpga_Irq_8  = 1 << 8,
01169    NiFpga_Irq_9  = 1 << 9,
01170    NiFpga_Irq_10 = 1 << 10,
01171    NiFpga_Irq_11 = 1 << 11,
01172    NiFpga_Irq_12 = 1 << 12,
01173    NiFpga_Irq_13 = 1 << 13,
01174    NiFpga_Irq_14 = 1 << 14,
01175    NiFpga_Irq_15 = 1 << 15,
01176    NiFpga_Irq_16 = 1 << 16,
01177    NiFpga_Irq_17 = 1 << 17,
01178    NiFpga_Irq_18 = 1 << 18,
01179    NiFpga_Irq_19 = 1 << 19,
01180    NiFpga_Irq_20 = 1 << 20,
01181    NiFpga_Irq_21 = 1 << 21,
01182    NiFpga_Irq_22 = 1 << 22,
01183    NiFpga_Irq_23 = 1 << 23,
01184    NiFpga_Irq_24 = 1 << 24,
01185    NiFpga_Irq_25 = 1 << 25,
01186    NiFpga_Irq_26 = 1 << 26,
01187    NiFpga_Irq_27 = 1 << 27,
01188    NiFpga_Irq_28 = 1 << 28,
01189    NiFpga_Irq_29 = 1 << 29,
01190    NiFpga_Irq_30 = 1 << 30,
01191    NiFpga_Irq_31 = 1U << 31
01192 } NiFpga_Irq;
01193 
01197 static const uint32_t NiFpga_InfiniteTimeout = 0xFFFFFFFF;
01198 
01202 typedef void* NiFpga_IrqContext;
01203 
01216 NiFpga_Status NiFpga_ReserveIrqContext(NiFpga_Session     session,
01217                                        NiFpga_IrqContext* context);
01218 
01226 NiFpga_Status NiFpga_UnreserveIrqContext(NiFpga_Session    session,
01227                                          NiFpga_IrqContext context);
01228 
01248 NiFpga_Status NiFpga_WaitOnIrqs(NiFpga_Session    session,
01249                                 NiFpga_IrqContext context,
01250                                 uint32_t          irqs,
01251                                 uint32_t          timeout,
01252                                 uint32_t*         irqsAsserted,
01253                                 NiFpga_Bool*      timedOut);
01254 
01262 NiFpga_Status NiFpga_AcknowledgeIrqs(NiFpga_Session session,
01263                                      uint32_t       irqs);
01264 
01276 NiFpga_Status NiFpga_ConfigureFifo(NiFpga_Session session,
01277                                    uint32_t       fifo,
01278                                    size_t         depth);
01279 
01293 NiFpga_Status NiFpga_ConfigureFifo2(NiFpga_Session session,
01294                                     uint32_t       fifo,
01295                                     size_t         requestedDepth,
01296                                     size_t*        actualDepth);
01304 NiFpga_Status NiFpga_StartFifo(NiFpga_Session session,
01305                                uint32_t       fifo);
01306 
01314 NiFpga_Status NiFpga_StopFifo(NiFpga_Session session,
01315                               uint32_t       fifo);
01316 
01329 NiFpga_Status NiFpga_ReadFifoBool(NiFpga_Session session,
01330                                   uint32_t       fifo,
01331                                   NiFpga_Bool*   data,
01332                                   size_t         numberOfElements,
01333                                   uint32_t       timeout,
01334                                   size_t*        elementsRemaining);
01335 
01348 NiFpga_Status NiFpga_ReadFifoI8(NiFpga_Session session,
01349                                 uint32_t       fifo,
01350                                 int8_t*        data,
01351                                 size_t         numberOfElements,
01352                                 uint32_t       timeout,
01353                                 size_t*        elementsRemaining);
01354 
01367 NiFpga_Status NiFpga_ReadFifoU8(NiFpga_Session session,
01368                                 uint32_t       fifo,
01369                                 uint8_t*       data,
01370                                 size_t         numberOfElements,
01371                                 uint32_t       timeout,
01372                                 size_t*        elementsRemaining);
01373 
01386 NiFpga_Status NiFpga_ReadFifoI16(NiFpga_Session session,
01387                                  uint32_t       fifo,
01388                                  int16_t*       data,
01389                                  size_t         numberOfElements,
01390                                  uint32_t       timeout,
01391                                  size_t*        elementsRemaining);
01392 
01405 NiFpga_Status NiFpga_ReadFifoU16(NiFpga_Session session,
01406                                  uint32_t       fifo,
01407                                  uint16_t*      data,
01408                                  size_t         numberOfElements,
01409                                  uint32_t       timeout,
01410                                  size_t*        elementsRemaining);
01411 
01424 NiFpga_Status NiFpga_ReadFifoI32(NiFpga_Session session,
01425                                  uint32_t       fifo,
01426                                  int32_t*       data,
01427                                  size_t         numberOfElements,
01428                                  uint32_t       timeout,
01429                                  size_t*        elementsRemaining);
01430 
01443 NiFpga_Status NiFpga_ReadFifoU32(NiFpga_Session session,
01444                                  uint32_t       fifo,
01445                                  uint32_t*      data,
01446                                  size_t         numberOfElements,
01447                                  uint32_t       timeout,
01448                                  size_t*        elementsRemaining);
01449 
01462 NiFpga_Status NiFpga_ReadFifoI64(NiFpga_Session session,
01463                                  uint32_t       fifo,
01464                                  int64_t*       data,
01465                                  size_t         numberOfElements,
01466                                  uint32_t       timeout,
01467                                  size_t*        elementsRemaining);
01468 
01481 NiFpga_Status NiFpga_ReadFifoU64(NiFpga_Session session,
01482                                  uint32_t       fifo,
01483                                  uint64_t*      data,
01484                                  size_t         numberOfElements,
01485                                  uint32_t       timeout,
01486                                  size_t*        elementsRemaining);
01487 
01501 NiFpga_Status NiFpga_WriteFifoBool(NiFpga_Session     session,
01502                                    uint32_t           fifo,
01503                                    const NiFpga_Bool* data,
01504                                    size_t             numberOfElements,
01505                                    uint32_t           timeout,
01506                                    size_t*            emptyElementsRemaining);
01507 
01521 NiFpga_Status NiFpga_WriteFifoI8(NiFpga_Session session,
01522                                  uint32_t       fifo,
01523                                  const int8_t*  data,
01524                                  size_t         numberOfElements,
01525                                  uint32_t       timeout,
01526                                  size_t*        emptyElementsRemaining);
01527 
01541 NiFpga_Status NiFpga_WriteFifoU8(NiFpga_Session session,
01542                                  uint32_t       fifo,
01543                                  const uint8_t* data,
01544                                  size_t         numberOfElements,
01545                                  uint32_t       timeout,
01546                                  size_t*        emptyElementsRemaining);
01547 
01561 NiFpga_Status NiFpga_WriteFifoI16(NiFpga_Session session,
01562                                   uint32_t       fifo,
01563                                   const int16_t* data,
01564                                   size_t         numberOfElements,
01565                                   uint32_t       timeout,
01566                                   size_t*        emptyElementsRemaining);
01567 
01581 NiFpga_Status NiFpga_WriteFifoU16(NiFpga_Session  session,
01582                                   uint32_t        fifo,
01583                                   const uint16_t* data,
01584                                   size_t          numberOfElements,
01585                                   uint32_t        timeout,
01586                                   size_t*         emptyElementsRemaining);
01587 
01601 NiFpga_Status NiFpga_WriteFifoI32(NiFpga_Session session,
01602                                   uint32_t       fifo,
01603                                   const int32_t* data,
01604                                   size_t         numberOfElements,
01605                                   uint32_t       timeout,
01606                                   size_t*        emptyElementsRemaining);
01607 
01621 NiFpga_Status NiFpga_WriteFifoU32(NiFpga_Session  session,
01622                                   uint32_t        fifo,
01623                                   const uint32_t* data,
01624                                   size_t          numberOfElements,
01625                                   uint32_t        timeout,
01626                                   size_t*         emptyElementsRemaining);
01627 
01641 NiFpga_Status NiFpga_WriteFifoI64(NiFpga_Session session,
01642                                   uint32_t       fifo,
01643                                   const int64_t* data,
01644                                   size_t         numberOfElements,
01645                                   uint32_t       timeout,
01646                                   size_t*        emptyElementsRemaining);
01647 
01661 NiFpga_Status NiFpga_WriteFifoU64(NiFpga_Session  session,
01662                                   uint32_t        fifo,
01663                                   const uint64_t* data,
01664                                   size_t          numberOfElements,
01665                                   uint32_t        timeout,
01666                                   size_t*         emptyElementsRemaining);
01667 
01692 NiFpga_Status NiFpga_AcquireFifoReadElementsBool(
01693                                              NiFpga_Session session,
01694                                              uint32_t       fifo,
01695                                              NiFpga_Bool**  elements,
01696                                              size_t         elementsRequested,
01697                                              uint32_t       timeout,
01698                                              size_t*        elementsAcquired,
01699                                              size_t*        elementsRemaining);
01700 
01726 NiFpga_Status NiFpga_AcquireFifoReadElementsI8(
01727                                              NiFpga_Session session,
01728                                              uint32_t       fifo,
01729                                              int8_t**       elements,
01730                                              size_t         elementsRequested,
01731                                              uint32_t       timeout,
01732                                              size_t*        elementsAcquired,
01733                                              size_t*        elementsRemaining);
01734 
01760 NiFpga_Status NiFpga_AcquireFifoReadElementsU8(
01761                                             NiFpga_Session  session,
01762                                             uint32_t        fifo,
01763                                             uint8_t**       elements,
01764                                             size_t          elementsRequested,
01765                                             uint32_t        timeout,
01766                                             size_t*         elementsAcquired,
01767                                             size_t*         elementsRemaining);
01768 
01794 NiFpga_Status NiFpga_AcquireFifoReadElementsI16(
01795                                             NiFpga_Session  session,
01796                                             uint32_t        fifo,
01797                                             int16_t**       elements,
01798                                             size_t          elementsRequested,
01799                                             uint32_t        timeout,
01800                                             size_t*         elementsAcquired,
01801                                             size_t*         elementsRemaining);
01802 
01828 NiFpga_Status NiFpga_AcquireFifoReadElementsU16(
01829                                            NiFpga_Session   session,
01830                                            uint32_t         fifo,
01831                                            uint16_t**       elements,
01832                                            size_t           elementsRequested,
01833                                            uint32_t         timeout,
01834                                            size_t*          elementsAcquired,
01835                                            size_t*          elementsRemaining);
01836 
01862 NiFpga_Status NiFpga_AcquireFifoReadElementsI32(
01863                                             NiFpga_Session  session,
01864                                             uint32_t        fifo,
01865                                             int32_t**       elements,
01866                                             size_t          elementsRequested,
01867                                             uint32_t        timeout,
01868                                             size_t*         elementsAcquired,
01869                                             size_t*         elementsRemaining);
01870 
01896 NiFpga_Status NiFpga_AcquireFifoReadElementsU32(
01897                                            NiFpga_Session   session,
01898                                            uint32_t         fifo,
01899                                            uint32_t**       elements,
01900                                            size_t           elementsRequested,
01901                                            uint32_t         timeout,
01902                                            size_t*          elementsAcquired,
01903                                            size_t*          elementsRemaining);
01904 
01930 NiFpga_Status NiFpga_AcquireFifoReadElementsI64(
01931                                             NiFpga_Session  session,
01932                                             uint32_t        fifo,
01933                                             int64_t**       elements,
01934                                             size_t          elementsRequested,
01935                                             uint32_t        timeout,
01936                                             size_t*         elementsAcquired,
01937                                             size_t*         elementsRemaining);
01938 
01964 NiFpga_Status NiFpga_AcquireFifoReadElementsU64(
01965                                            NiFpga_Session   session,
01966                                            uint32_t         fifo,
01967                                            uint64_t**       elements,
01968                                            size_t           elementsRequested,
01969                                            uint32_t         timeout,
01970                                            size_t*          elementsAcquired,
01971                                            size_t*          elementsRemaining);
01972 
01997 NiFpga_Status NiFpga_AcquireFifoWriteElementsBool(
01998                                              NiFpga_Session session,
01999                                              uint32_t       fifo,
02000                                              NiFpga_Bool**  elements,
02001                                              size_t         elementsRequested,
02002                                              uint32_t       timeout,
02003                                              size_t*        elementsAcquired,
02004                                              size_t*        elementsRemaining);
02005 
02031 NiFpga_Status NiFpga_AcquireFifoWriteElementsI8(
02032                                              NiFpga_Session session,
02033                                              uint32_t       fifo,
02034                                              int8_t**       elements,
02035                                              size_t         elementsRequested,
02036                                              uint32_t       timeout,
02037                                              size_t*        elementsAcquired,
02038                                              size_t*        elementsRemaining);
02039 
02065 NiFpga_Status NiFpga_AcquireFifoWriteElementsU8(
02066                                              NiFpga_Session session,
02067                                              uint32_t       fifo,
02068                                              uint8_t**      elements,
02069                                              size_t         elementsRequested,
02070                                              uint32_t       timeout,
02071                                              size_t*        elementsAcquired,
02072                                              size_t*        elementsRemaining);
02073 
02099 NiFpga_Status NiFpga_AcquireFifoWriteElementsI16(
02100                                              NiFpga_Session session,
02101                                              uint32_t       fifo,
02102                                              int16_t**      elements,
02103                                              size_t         elementsRequested,
02104                                              uint32_t       timeout,
02105                                              size_t*        elementsAcquired,
02106                                              size_t*        elementsRemaining);
02107 
02133 NiFpga_Status NiFpga_AcquireFifoWriteElementsU16(
02134                                              NiFpga_Session session,
02135                                              uint32_t       fifo,
02136                                              uint16_t**     elements,
02137                                              size_t         elementsRequested,
02138                                              uint32_t       timeout,
02139                                              size_t*        elementsAcquired,
02140                                              size_t*        elementsRemaining);
02141 
02167 NiFpga_Status NiFpga_AcquireFifoWriteElementsI32(
02168                                              NiFpga_Session session,
02169                                              uint32_t       fifo,
02170                                              int32_t**      elements,
02171                                              size_t         elementsRequested,
02172                                              uint32_t       timeout,
02173                                              size_t*        elementsAcquired,
02174                                              size_t*        elementsRemaining);
02175 
02201 NiFpga_Status NiFpga_AcquireFifoWriteElementsU32(
02202                                              NiFpga_Session session,
02203                                              uint32_t       fifo,
02204                                              uint32_t**     elements,
02205                                              size_t         elementsRequested,
02206                                              uint32_t       timeout,
02207                                              size_t*        elementsAcquired,
02208                                              size_t*        elementsRemaining);
02209 
02235 NiFpga_Status NiFpga_AcquireFifoWriteElementsI64(
02236                                              NiFpga_Session session,
02237                                              uint32_t       fifo,
02238                                              int64_t**      elements,
02239                                              size_t         elementsRequested,
02240                                              uint32_t       timeout,
02241                                              size_t*        elementsAcquired,
02242                                              size_t*        elementsRemaining);
02243 
02269 NiFpga_Status NiFpga_AcquireFifoWriteElementsU64(
02270                                              NiFpga_Session session,
02271                                              uint32_t       fifo,
02272                                              uint64_t**     elements,
02273                                              size_t         elementsRequested,
02274                                              uint32_t       timeout,
02275                                              size_t*        elementsAcquired,
02276                                              size_t*        elementsRemaining);
02277 
02291 NiFpga_Status NiFpga_ReleaseFifoElements(NiFpga_Session session,
02292                                          uint32_t       fifo,
02293                                          size_t         elements);
02294 
02303 NiFpga_Status NiFpga_GetPeerToPeerFifoEndpoint(NiFpga_Session session,
02304                                                uint32_t       fifo,
02305                                                uint32_t*      endpoint);
02306 
02307 #if NiFpga_Cpp
02308 }
02309 #endif
02310 
02311 #endif
 All Classes Functions Variables