Software Library API naibrd 1.62
See all documentation at naii.docs.com
naibrd_ttl.c File Reference
#include <stdlib.h>
#include <math.h>
#include "functions/naibrd_ttl.h"
#include "maps/nai_map_ttl.h"
#include "advanced/naibrd_adv.h"
#include "naibrd_config.h"
#include "boards/naibrd_gen5.h"
#include "nai_ether.h"
#include "naibrd_ether.h"

Macros

#define NAI_TTL_GEN3_MAX_DEBOUNCE_TIME_MSEC   343592.1408 /* msec (343.5921408 seconds) */
 
#define NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MSEC   0.00016 /* msec (160 ns) */
 
#define NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MASK   0x000F /* Debounce LSB exponential multiplier, where 0xF = 2^15 x 160ns LSB = 5.24288 msec */
 
#define NAI_TTL_GEN5_TIMER_LSB_MSEC   0.000008 /* msec (8 ns) */
 

Functions

NAIBRDFUNC int32_t NAIAPI naibrd_TTL_GetChannelCount (uint32_t modid)
 Returns the number of channels for the specified TTL Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_TTL_GetGroupCount (uint32_t modid)
 Returns the number of channel groups for the specified TTL Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_TTL_GetGroupSize (uint32_t modid)
 Returns the number of channel in each group for the specified TTL Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_TTL_GetVCCBankCount (uint32_t modid)
 Returns the number of VCC channel banks for the specified TTL Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_TTL_GetVCCBankSize (uint32_t modid)
 Returns the number of channels in each VCC bank for the specified TTL Module ID.
 
NAIBRDFUNC float64_t NAIAPI naibrd_TTL_GetTimebaseLSB (uint32_t modid)
 Returns the LSB for the timer interval for Debounce, Measurement, PWM and Pattern Generator clocks for the specified TTL Module ID.
 
NAIBRDFUNC uint32_t NAIAPI naibrd_TTL_GetValidPatternGenStart (uint32_t modid)
 Returns the LSB for the timer interval for Measurement, PWM and Pattern Generator clocks for the specified TTL Module ID.
 
NAIBRDFUNC uint32_t NAIAPI naibrd_TTL_GetValidPatternGenEnd (uint32_t modid)
 Returns the LSB for the timer interval for Measurement, PWM and Pattern Generator clocks for the specified TTL Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetOutputState (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_state_t state)
 Sets the Output State for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetOutputState (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_state_t *outstate)
 Retrieves the Output State for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetInputState (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_state_t *inputstate)
 Retrieves the Input State for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type, nai_status_bit_t *outstatusVal)
 Retrieves the realtime or continuous status for the specified TTL channel and status type. Realtime status always represents the present status at the time of the read, as opposed to the latched status, which retains transient indications until cleared.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type)
 Clears the latched status for the specified TTL channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_ioformat_t format)
 Sets the Input/Output configuration for the specified TTL channel. Default configuration for the channels is input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_ioformat_t *outformat)
 Retrieves the Input/Output configuration for the specified TTL channel. Default configuration for the channels is input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_enhanced_mode_t mode)
 Sets the Operation mode for the specified TTL channel. Default power on configuration for the channels is Input. Selection of one of the basic modes will switch to transceiver (basic) mode operation with no signal processing.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_enable_t enable)
 Sets operation to disabled or enabled for specified TTL channel.

 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_enable_t *outenable)
 Retrieves the present enhance operation enable state for the specified Discrete channel. Power on default configuration for the channels is Enhanced Input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_enhanced_mode_t *outmode)
 Retrieves the Operation mode for the specified TTL channel. Retrieves either Basic/Transceiver modes or other modes, depending whether the Transceiver mode is enabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetBankVCCSource (int32_t cardIndex, int32_t module, int32_t bank, nai_ttl_vcc_t source)
 Sets the Vcc source to internal or external for the specified TTL bank. Power on default is internal Vcc.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetBankVCCSource (int32_t cardIndex, int32_t module, int32_t bank, nai_ttl_vcc_t *outsource)
 Retrieves the Vcc source to internal or external for the specified TTL bank. Power on default is internal Vcc.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetBankVCCReading (int32_t cardIndex, int32_t module, int32_t bank, float64_t *outvoltage)
 Retrieves the Vcc voltage reading for the specified TTL bank, reading is returned in volts. This feature is only supported on X2 TTL modules and up.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_Reset (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_reset_type_t resetType)
 Resets the TTL channel as specified by the reset type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ResetAll (int32_t cardIndex, int32_t module, nai_ttl_reset_type_t resetType)
 Resets all channels on the module as specified by the reset type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t debounceTime_mS)
 Sets the debounce time for the specified channel. Enter time in milliseconds. When a signal level is within a valid logic range and maintains that level for a period longer than the debounce time, the logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored.
Once valid, the transition status is set and the output logic changes state.
Enter a value of 0 to disable debounce filtering. Debounce defaults to 0 upon power on or reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outdebounceTime_mS)
 Retrieves the debounce time for the specified TTL channel, in units of milliseconds. When a signal level is within a valid logic range and maintains that level for a period longer than the debounce time, the logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored.
Once valid, the transition status is set and the output logic changes state.
A value of 0 disables debounce filtering. Debounce defaults to 0 upon power on or reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetDebounceLSB (int32_t cardIndex, int32_t module, float64_t debounceTimeLSB_mS)
 Sets the debounce LSB time value (applies to all the channels on the module). This debounce LSB time value coupled with the value in the individual channel debounce time registers will determine the effective debounce time for each channel. Feature presently available only on the D7 TTL module; LSB is fixed on other modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetDebounceLSB (int32_t cardIndex, int32_t module, float64_t *outdebounceLSB_mS)
 Retrieves the debounce LSB time value, applicable for all channels on the module. This value, multiplied by the value set in the individual channel debounce time register determines the effective debounce time for each channel. For the D7 module, this LSB unit is user configurable. Debounce LSB is fixed in other modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ClearFIFO (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the FIFO Data for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetFIFOStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount, nai_ttl_fifo_status_t *outstatus)
 Retrieves the TTL channel's FIFO Buffer Status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount)
 Retrieves the number of elements in FIFO for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ReadFIFORaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count, uint32_t outdata[], uint32_t *outread)
 Retrieves the data elements from the TTL channel's FIFO buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetTimebaseInterval (int32_t cardIndex, int32_t module, int32_t channel, float64_t interval)
 Sets the timebase for frequency measurements for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetTimebaseInterval (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outinterval)
 Retrieves the timebase for frequency measurements for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ClearCountData (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the measurement count data for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetCountData (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount)
 Retrieves the measurement count data for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenPeriod (int32_t cardIndex, int32_t module, int32_t channel, float64_t period_mS)
 Sets the period for the Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenPeriod (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outperiod_mS)
 Retrieves the period for the Pattern Generator for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGen_BurstNum (int32_t cardIndex, int32_t module, uint32_t burstNum)
 Sets the number of cycles to output in the PatternGen burst mode for the specified Discrete module. The set value is applicable for enhanced IO PatternGen burst mode.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGen_BurstNum (int32_t cardIndex, int32_t module, uint32_t *outburstNum)
 Retrieves the number of cycles set to output in the PatternGen burst mode for the specified Discrete module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenBuf (int32_t cardIndex, int32_t module, int32_t dataPatternLen, uint32_t *dataPattern)
 Sets the pattern for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenBuf (int32_t cardIndex, int32_t module, int32_t dataPatternLen, uint32_t *dataPattern)
 Retrieves the pattern for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenStartAddr (int32_t cardIndex, int32_t module, uint32_t startAddr)
 Sets the starting address to look at for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenStartAddr (int32_t cardIndex, int32_t module, uint32_t *outstartAddr)
 Gets the starting address to look at for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenEndAddr (int32_t cardIndex, int32_t module, uint32_t EndAddr)
 Sets the Ending address to look at for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenEndAddr (int32_t cardIndex, int32_t module, uint32_t *outEndAddr)
 Gets the Ending address to look at for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenCtrl (int32_t cardIndex, int32_t module, nai_ttl_pattern_ctrl_t controlBit, nai_ttl_enable_t state)
 Sets the state for the RAM Pattern Generator for the selected control bit on the module. Options are enable and disable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenCtrl (int32_t cardIndex, int32_t module, nai_ttl_pattern_ctrl_t controlBit, nai_ttl_enable_t *outstate)
 Gets the state for the RAM Pattern Generator for the selected control bit on the module. Options are enable and disable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPatternGenCtrlRaw (int32_t cardIndex, int32_t module, uint32_t controlRaw)
 Sets the control bits for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPatternGenCtrlRaw (int32_t cardIndex, int32_t module, uint32_t *outcontrolRaw)
 Retrieves the control bits for RAM Pattern Generator.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_StartPWM (int32_t cardIndex, int32_t module, int32_t channel)
 Starts the PWM output for the selected channel on the module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_StopPWM (int32_t cardIndex, int32_t module, int32_t channel)
 Stops the PWM output for the selected channel on the module. For Gen5 modules, this is done by issuing a timer-only reset to halt the PWM output. To restart PWM, the PWM trigger command is again issued.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPWM_Period (int32_t cardIndex, int32_t module, int32_t channel, float64_t period)
 Sets the PWM period for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPWM_Period (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outperiod)
 Retrieves the PWM period value set for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPWM_Pulsewidth (int32_t cardIndex, int32_t module, int32_t channel, float64_t pulsewidth)
 Sets the PWM pulsewidth for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPWM_Pulsewidth (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outpulsewidth)
 Retrieves the PWM pulsewidth value set for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPWM_BurstNum (int32_t cardIndex, int32_t module, int32_t channel, uint32_t burstNum)
 Sets the number of cycles to output in the PWM burst mode for the specified TTL channel. The set value is applicable for IO PWM burst mode (mode 12).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPWM_BurstNum (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outburstNum)
 Retrieves the number of cycles set to output in the PWM burst mode for the specified TTL channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetPWM_Polarity (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_pwm_polarity_t polarity)
 Sets the polarity for the PWM output for the selected channel on the module. Options are positive and negative polarity, where positive indicates the high state corresponds to the pulsewidth setting, and negative inverts it for a negative going pulse output.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetPWM_Polarity (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_pwm_polarity_t *outpolarity)
 Retrieves the polarity setting for the PWM output for the selected channel on the module. Options are positive and negative polarity, where positive setting indicates the high state corresponds to the pulsewidth setting, and negative setting inverts it for a negative going pulse output.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetSynchronousPreloadData (int32_t cardIndex, int32_t module, uint32_t preloadData)
 Loads the Preload Data register with the specified pattern bitmap.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetSynchronousPreloadData (int32_t cardIndex, int32_t module, uint32_t *preloadData)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type, bool_t enable)
 Sets the Interrupt Enable for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type, bool_t *outenable)
 Retrieves the Interrupt Enable for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetEdgeLevelInterrupt (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type, nai_ttl_interrupt_t interruptType)
 Sets the Interrupt Edge/Level property for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetEdgeLevelInterrupt (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_status_type_t type, nai_ttl_interrupt_t *outinterruptType)
 Retrieves the Interrupt Edge/Level property for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetGroupInterruptVector (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t vector)
 Sets the Interrupt Vector for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupInterruptVector (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t *outvector)
 Retrieves the Interrupt Vector for the specified TTL channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetGroupInterruptSteering (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified TTL group and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupInterruptSteering (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, naibrd_int_steering_t *outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified TTL group and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetBITInterval (int32_t cardIndex, int32_t module, uint32_t bitInterval)
 Sets the BIT Error Interval. The BIT Error Interval essentially filter BIT errors prior to an actual notification of a BIT Error (maybe advantageous in "noisy/unstable" application environments or for general filtering purposes). The BIT Error Interval mechanism uses an up/down counter such that accumulated successive fault detections are counted up and no fault detections are counted down. The BIT Error Interval essentially sets up a threshold requirement of "successive" fault events to accumulate before actual notification of the fault.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetBITInterval (int32_t cardIndex, int32_t module, uint32_t *outbitInterval)
 Retrieves the BIT Error Interval. The BIT Error Interval essentially filter BIT errors prior to an actual notification of a BIT Error (maybe advantageous in "noisy/unstable" application environments or for general filtering purposes). The BIT Error Interval mechanism uses an up/down counter such that accumulated successive fault detections are counted up and no fault detections are counted down. The BIT Error Interval essentially sets up a threshold requirement of "successive" fault events to accumulate before actual notification of the fault.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertToDebounceLSBtime (uint32_t modid, nai_ttl_debounce_idx_t rawdata, float64_t *debounceLSBtime)
 Returns the debounce LSB time value associated with the debounce LSB index.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ConvertDebounceLSBtime (uint32_t modid, float64_t debounceTimeLSB, uint32_t *debounceLSB)
 Returns the closest debounce LSB index associated with the debounce LSB time value parameter.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetRaw (int32_t cardIndex, int32_t module, nai_ttl_raw_module_t type, uint32_t rawdata)
 Sets the raw data value in the register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetRaw (int32_t cardIndex, int32_t module, nai_ttl_raw_module_t type, uint32_t *outrawdata)
 Retrieves the raw data value in the register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetGroupRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_raw_group_t type, uint32_t rawdata)
 Sets the raw data value in the group register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_raw_group_t type, uint32_t *outrawdata)
 Retrieves the raw data value in the group register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_raw_channel_t type, uint32_t rawdata)
 Sets the raw data value in the register associated to the channel and register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_ttl_raw_channel_t type, uint32_t *outrawdata)
 Retrieves the raw data value in the register associated to the channel and register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupInputStateRaw (int32_t cardIndex, int32_t module, int32_t group, uint32_t *outstateRaw)
 Retrieves the Input State for all channels within the specified group of the TTL module. 'state' has one bit per channel, where the LSB is the 1st channel in 'group'.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupStatusRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t *outstatusRaw)
 Retrieves the status of the specified type for the specified group. The status of a channel is flagged and latched until read. Reading any status bit will cause that bit to be unlatched.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_ClearGroupStatusRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t statusRaw)
 Clears the status of the specified type for the specified group. The status of a channel is flagged and latched until a "1" is written to the bit. Writing a "1" to the status bit will cause that bit to be unlatched.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetGroupInterruptEnableRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t enableRaw)
 Sets the Interrupt Enable state for the specified type and group.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetGroupInterruptEnableRaw (int32_t cardIndex, int32_t module, int32_t group, nai_ttl_status_type_t type, uint32_t *outenableRaw)
 Retrieves the Interrupt Enable state for the specified type and group.
 

Macro Definition Documentation

◆ NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MASK

#define NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MASK   0x000F /* Debounce LSB exponential multiplier, where 0xF = 2^15 x 160ns LSB = 5.24288 msec */

◆ NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MSEC

#define NAI_TTL_GEN3_DEBOUNCE_TIME_LSB_MSEC   0.00016 /* msec (160 ns) */

◆ NAI_TTL_GEN3_MAX_DEBOUNCE_TIME_MSEC

#define NAI_TTL_GEN3_MAX_DEBOUNCE_TIME_MSEC   343592.1408 /* msec (343.5921408 seconds) */

◆ NAI_TTL_GEN5_TIMER_LSB_MSEC

#define NAI_TTL_GEN5_TIMER_LSB_MSEC   0.000008 /* msec (8 ns) */

Function Documentation

◆ naibrd_TTL_GetSynchronousPreloadData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_GetSynchronousPreloadData ( int32_t cardIndex,
int32_t module,
uint32_t * preloadData )

◆ naibrd_TTL_SetSynchronousPreloadData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_TTL_SetSynchronousPreloadData ( int32_t cardIndex,
int32_t module,
uint32_t preloadData )

Loads the Preload Data register with the specified pattern bitmap.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
preloadData: (Input) Bitmap to be placed in the Preload Data register. Note that bit 0 corresponds to channel 2
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.