Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
naibrd_ad.c File Reference

Functions

static int32_t GetChannelCount (uint32_t modId)
 
static int32_t GetMaxFIFOCount (uint32_t modId)
 
static nai_status_t naibrd_AD_VerifyChannel (uint32_t modId, int32_t channel)
 
static nai_status_t naibrd_AD_VerifyChanMappedStatusType (naibrd_ad_chan_mapped_status_type_t statusType)
 
static nai_status_t naibrd_AD_VerifyChanMappedLatchStatusType (naibrd_ad_chan_mapped_status_type_t statusType)
 
static nai_status_t naibrd_AD_ExtractInfoFromEventMappedStatus (naibrd_ad_event_mapped_status_type_t statusType, int32_t channel, uint32_t *p_outoffset, uint32_t *p_outshift)
 
static nai_status_t naibrd_AD_VerifyFilterBreakFrequency (uint32_t modId, uint32_t frequency)
 
static nai_status_t naibrd_AD_VerifyMode (naibrd_ad_mode_t mode)
 
static nai_status_t naibrd_AD_VerifyFloatingPointAttributeType (naibrd_ad_floating_point_attribute_t attribute)
 
static nai_status_t naibrd_AD_GetRangeInfo (uint32_t modId, naibrd_ad_mode_t mode, uint32_t rawRange, uint32_t *p_rangeIndex, float64_t *p_outrange)
 
static nai_status_t naibrd_AD_GetRangeInfoRaw (uint32_t modId, naibrd_ad_mode_t mode, float64_t range, uint32_t *p_rangeIndex, uint32_t *p_outrawRange)
 
static nai_status_t naibrd_AD_VerifyPolarityType (naibrd_ad_polarity_t polarity)
 
static nai_status_t naibrd_AD_VerifyRawType (naibrd_ad_raw_t type)
 
static nai_status_t naibrd_AD_VerifyChannelRawType (naibrd_ad_channel_raw_t type)
 
NAIBRDFUNC int32_t NAIAPI naibrd_AD_GetChannelCount (uint32_t modId)
 Returns the number of channels for the specified A/D Module ID.
 
NAIBRDFUNC int32_t NAIAPI naibrd_AD_GetMaxFIFOCount (uint32_t modId)
 Returns the maximum size of the FIFO for the specified A/D Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_mode_t mode, float64_t *p_outvoltage)
 Retrieves the measured voltage, current or engineering units (when in FloatingPoint mode) from the specified A/D channel data register. The measured data is scaled per the range and polarity register value. Current is in mAmps.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetLatchChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t latched)
 Latches or unlatch A/D channels. All channels are latched/unlatched in unison and the channel parameter is ignored except for the ADE, ADF and ADG modules where only the channel specified is affected. For these modules, a channel = 0 will latch/unlatch all channels at once.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetLatchChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outlatched)
 Retrieves the Latch state (latched or unlatched) of A/D channels. All channels are latched/unlatched in unison and the channel parameter is ignored except for the ADE, ADF and ADG modules where only the channel specified is affected. For these modules, a channel = 0 will latch/unlatch all channels at once.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType)
 Clears the specified A/D Status for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the specified A/D Status for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables/disables status reporting for the specified AD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Retrieves the enabled/disabled state of status reporting for the specified AD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetRangePolarity (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_polarity_t polarity, float64_t range)
 Sets the range and polarity for the specified A/D channel as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetRangePolarity (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_polarity_t *p_outpolarity, float64_t *p_outrange)
 Retrieves the range and polarity for the specified A/D channel as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetSampleRate (int32_t cardIndex, int32_t module, uint32_t rate)
 Sets the sampling clock rate for the specified A/D module as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetSampleRate (int32_t cardIndex, int32_t module, uint32_t *p_outrate)
 Retrieves the sampling clock rate for the specified A/D module as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFilterBreakFrequency (int32_t cardIndex, int32_t module, int32_t channel, uint32_t freq)
 Sets the filter break frequency for the specified A/D channel. The break frequency is the 3 db point of a single pole low pass filter. The break frequency can be specified between 10 Hz to 10 KHz with LSB equal to 1 Hz. Zero disables the filter.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFilterBreakFrequency (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outfreq)
 Retrieves the filter break frequency for the specified A/D channel. The break frequency is the 3 db point of a single pole low pass filter. The break frequency can be between 10 Hz to 10 KHz with LSB equal to 1 Hz. Zero indicates a disabled filter.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetMode (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_mode_t mode)
 Sets the VI control (voltage/current mode) for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetMode (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_mode_t *p_outmode)
 Retrieves the VI control (voltage/current mode) for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFloatingPointAttribute (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_floating_point_attribute_t attribute, float64_t value)
 Sets the HW floating point offset for the specified A/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFloatingPointAttribute (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_floating_point_attribute_t attribute, float64_t *p_outvalue)
 Retrieves the HW floating point offset for the specified A/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetThresholdDetect (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_threshold_detect_id_type_t thresholdID, float64_t thresholdSet, float64_t thresholdClear)
 Sets the A/D thresholds that set and clear the status for the specified thresholdID (Threshold1 or Threshold2) and channel. The threshold direction and hysteresis, which are required by the H/W, are derived from 'set' and 'clear' values.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetThresholdDetect (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_threshold_detect_id_type_t thresholdID, float64_t *p_outthresholdSet, float64_t *p_outthresholdClear)
 Retrieves the A/D thresholds that set and clear the status for the specified thresholdID (Threshold1 or Threshold2) and channel. The threshold 'set', 'direction' and 'hysteresis' are read from the H/W and are used to derive the threshold 'clear' value.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetSaturationControl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_saturation_control_type_t saturationType, bool_t enable)
 Enables/Disables the Saturation Control for the specified saturation type and channel. Enabling a saturation type of NAI_AD_SATURATION_CONTROL_LOW will limit the channel's lower reading to the value specified in the Low Saturation Level register. Enabling a saturation type of NAI_AD_SATURATION_CONTROL_HIGH will limit the channel's upper reading to the value specified in the High Saturation Level register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetSaturationControl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_saturation_control_type_t saturationType, bool_t *p_outenable)
 Retrieves the Saturation Control for the specified saturation type and channel. Enabling a saturation type of NAI_AD_SATURATION_CONTROL_LOW will limit the channel's lower reading to the value specified in the Low Saturation Level register. Enabling a saturation type of NAI_AD_SATURATION_CONTROL_HIGH will limit the channel's upper reading to the value specified in the High Saturation Level register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetSaturationLevel (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_saturation_control_type_t saturationType, float64_t level)
 Sets the Saturation level for the specified saturation type and channel. A saturation type of NAI_AD_SATURATION_CONTROL_LOW will set the lower limit of the channel's reading to the value specified. A saturation type of NAI_AD_SATURATION_CONTROL_HIGH will set the upper limit of the channel's upper reading to the value specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetSaturationLevel (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_saturation_control_type_t saturationType, float64_t *p_outlevel)
 Retrieves the Saturation level for the specified saturation type and channel. A saturation type of NAI_AD_SATURATION_CONTROL_LOW will get the lower saturation limit of the channel specified. A saturation type of NAI_AD_SATURATION_CONTROL_HIGH will get the upper saturation limit of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t active)
 Sets the bit corresponding to the specified channel in the Active Channel Register. Setting the active channel bit to "inactive" for unused channels will prevent false alarms (BIT or Open, for example) from being generated for unused channels. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outactive)
 Retrieves the bit corresponding to the specified channel in the Active Channel Register. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetD0TestParams (int32_t cardIndex, int32_t module, naibrd_ad_polarity_t polarity, float64_t range, float64_t testLevel)
 Sets the D0 Test Range and D0 Test Voltage for A/D module under test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetD0TestParams (int32_t cardIndex, int32_t module, naibrd_ad_polarity_t *p_outpolarity, float64_t *p_outrange, float64_t *p_outtestLevel)
 Retrieves the D0 Test Range and D0 Test Voltage for A/D module under test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t *p_outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_CheckPowerOnBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outpbitComplete)
 Retrieves the Power-On BIT (PBIT) status (complete or incomplete) for the specified module. The PBIT result will be in the BIT status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetModuleBITErrorThreshold (int32_t cardIndex, int32_t module, uint32_t threshold)
 Sets the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModuleBITErrorThreshold (int32_t cardIndex, int32_t module, uint32_t *p_outthreshold)
 Retrieves the BIT Error Threshold for continuous BIT conditions. The Error Threshold is a scalar for the internal BIT +2/-1 counter. To filter our momentary or intermittent anomalies in background BIT errors, this value can be increased to allow the error the "come and go" before the BIT status is flagged.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearModuleBITLogic (int32_t cardIndex, int32_t module, int32_t channel)
 Resets the Continuous BIT internal circuitry and counter mechanism for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType, bool_t enable)
 Sets the A/D BIT or Open Status Interrupt Enable state for the specified A/D channel. BIT Status and Open Status is part of the background testing. When the interrupt is enabled, a non-compliant channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType, bool_t *p_outenable)
 Retrieves the A/D BIT or Open Status Interrupt Enable state for the specified A/D channel. BIT Status and Open Status is part of the background testing. When the interrupt is enabled, a non-compliant channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, uint32_t vector)
 Sets the A/D BIT or Open Status Interrupt Vector for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, uint32_t *p_outvector)
 Retrieves the A/D BIT or Open Status Interrupt Vector for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t triggerType)
 Sets the edge or level triggered interrupt mask for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t *p_outtriggerType)
 Retrieves the edge or level triggered interrupt mask for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, naibrd_int_steering_t *p_outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetEventMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType, bool_t enable)
 Sets the Status Interrupt Enable state for the specified A/D channel. When the interrupt is enabled, a non-compliant channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType, bool_t *p_outenable)
 Retrieves the A/D Status Interrupt Enable state for the specified A/D channel. When the interrupt is enabled, a non-compliant channel will trigger an interrupt. By default, interrupts are disabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetEventMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType, naibrd_int_trigger_type_t triggerType)
 Sets the edge or level triggered interrupt mask for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_status_type_t statusType, naibrd_int_trigger_type_t *p_outtriggerType)
 Retrieves the edge or level triggered interrupt mask for the specified A/D channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetEventMappedInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_category_type_t categoryType, uint32_t vector)
 Sets the A/D Event Mapped Status Interrupt Vector for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_category_type_t categoryType, uint32_t *p_outvector)
 Retrieves the A/D Event Mapped Status Interrupt Vector for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetEventMappedInterruptSteering (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_category_type_t categoryType, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedInterruptSteering (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_category_type_t categoryType, naibrd_int_steering_t *p_outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outcount)
 Retrieves the FIFO counter registers that indicate the number of data elements in the A/D channel's FIFO buffer. Each time a read operation is made to the A/D channel's FIFO Buffer, the corresponding FIFO counter register is decremented by one. The maximum number of items that can be stored in each A/D channel's FIFO is 26,213 (0x6665). The maximum number of items that can be stored in each gen5 A/D channel's FIFO is 2,097,151 (0x001FFFFF).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ReadFIFORaw32 (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count, uint32_t p_outdata[], uint32_t *p_outread)
 Retrieves data elements from the A/D channel's FIFO buffer. The data is presented in two's complement format. For bipolar mode; 0x7FFF equals Positive Full Scale, 0x8000 equals Negative Full Scale. For unipolar mode, the range is from 0x0000 to 0xFFFF where 0xFFFF equals Full Scale.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ReadFIFO (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count, float64_t p_outdata[], uint32_t *p_outread)
 Retrieves data elements from the A/D channel's FIFO buffer. The data is retrieved in two's complement format, and is then converted into floating-point format. If floating-point mode is enabled for the module, the data will be converted into IEEE 754 (32-bit) floating-point format. If floating-point mode is disabled, the data is converted into floating-point format based on the following specifications: For bipolar mode; 0x7FFF equals Positive Full Scale, 0x8000 equals Negative Full Scale. For unipolar mode, the range is from 0x0000 to 0xFFFF where 0xFFFF equals Full Scale. Full Scale is the maximum value of the range.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t empty)
 Sets the almost empty mark to use to set or reset the A/D channel's FIFO Status "Almost Empty" bit. When the A/D channel's FIFO counter is less than or equal to the almost empty mark, the "Almost Empty" bit will be set. When the A/D channel's FIFO counter is greater than the almost empty mark, the "Almost Empty" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outempty)
 Retrieves the "almost empty" mark used to set or reset the A/D channel's FIFO Status "Almost Empty" bit. When the A/D channel's FIFO counter is less than or equal to the "almost empty" mark, the "Almost Empty" bit will be set. When the A/D channel's FIFO counter is greater than the "almost empty" mark, the "Almost Empty" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t full)
 Sets the almost full mark to use to set or reset the A/D channel's FIFO Status "Almost Full" bit. When the A/D channel's FIFO counter is less than or equal to the almost full mark, the "Almost Full" bit will be set. When the A/D channel's FIFO counter is greater than the almost full mark, the "Almost Full" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outfull)
 Retrieves the "almost full" mark used to set or reset the A/D channel's FIFO Status "Almost Full" bit. When the A/D channel's FIFO counter is less than or equal to the "almost full" mark, the "Almost Full" bit will be set. When the A/D channel's FIFO counter is greater than the "almost full" mark, the "Almost Full" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOLoThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t threshold)
 Sets the low threshold level to use to set or reset the A/D channel's FIFO Status "Low Limit" bit. When the A/D channel's FIFO counter is less than or equal to the low threshold level, the "Low Limit" bit will be set. When the A/D channel's FIFO counter is greater than the low threshold level, the "Low Limit" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOLoThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outthreshold)
 Retrieves the low threshold level to use to set or reset the A/D channel's FIFO Status "Low Limit" bit. When the A/D channel's FIFO counter is less than or equal to the low threshold level, the "Low Limit" bit will be set. When the A/D channel's FIFO counter is greater than the low threshold level, the "Low Limit" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOHiThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t threshold)
 Sets the high threshold level to use to set or reset the A/D channel's FIFO Status "High Limit" bit. When the A/D channel's FIFO counter is greater than or equal to the high threshold level, the "High Limit" bit will be set. When the A/D channel's FIFO counter is less than the high threshold level, the "High Limit" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOHiThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outthreshold)
 Retrieves the high threshold level to use to set or reset the A/D channel's FIFO Status "High Limit" bit. When the A/D channel's FIFO counter is greater than or equal to the high threshold level, the "High Limit" bit will be set. When the A/D channel's FIFO counter is less than the high threshold level, the "High Limit" bit will be reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFODelay (int32_t cardIndex, int32_t module, int32_t channel, uint32_t delay)
 Sets the number of delay samples before the actual FIFO data collection begins. The data collected during the delay period will be discarded.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFODelay (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outdelay)
 Retrieves the number of delay samples before the actual FIFO data collection begins. The data collected during the delay period will be discarded.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t size)
 Sets the number of samples to be taken and placed into the FIFO before the A/D channel's FIFO Status "Sample Done" bit is set after a trigger occurs. Note that the size of each sample (number of words written to the FIFO per sample) is determined by the sample format described by the Buffer Control register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outsize)
 Retrieves the number of samples to be taken and placed into the FIFO before the A/D channel's FIFO Status "Sample Done" bit is set after a trigger occurs. Note that the size of each sample (number of words written to the FIFO per sample) is determined by the sample format described by the Buffer Control register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOSkip (int32_t cardIndex, int32_t module, int32_t channel, uint32_t skip)
 Sets the skip count for the FIFO buffer. The FIFO skip count sets how many samples to skip over in between each FIFO store. For example, if the sample rate for a channel is 10kHz, there would be a new sample every 100 micro-seconds. By setting the FIFO skip count to 1, the FIFO would store a new sample every 200us, or in other words, at a 5kHz rate.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOSkip (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outskip)
 Retrieves the skip count for the FIFO buffer. The FIFO skip count sets how many samples to skip over in between each FIFO store. For example, if the sample rate for a channel is 10kHz, there would be a new sample every 100 micro-seconds. By setting the FIFO skip count to 1, the FIFO would store a new sample every 200us, or in other words, at a 5kHz rate.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOCtrl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_fifo_ctrl_t ctrl)
 Sets the format of the samples to be stored in the A/D channel's FIFO buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOCtrl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_fifo_ctrl_t *p_outctrl)
 Retrieves the format of the samples to be stored in the A/D channel's FIFO buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearFIFO (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the channel's data FIFO.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFIFOTrigCtrl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_fifo_trig_t ctrl)
 Sets the A/D channel's FIFO buffer trigger control configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFIFOTrigCtrl (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_fifo_trig_t *p_outctrl)
 Retrieves the A/D channel's FIFO buffer trigger control configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SoftwareTrigger (int32_t cardIndex, int32_t module)
 Sets the A/D module's FIFO Buffer Software Trigger register to 1. The Software trigger is used to kick start the FIFO buffer and the collection of data. The Trigger Control Configuration for each A/D channel's FIFO must be set up properly before invoking this routine. Setting the Software Trigger will start FIFO data collection for all A/D channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_ad_module_power_reset_status_type_t modulePowerResetStatusType, bool_t *p_outmodulePowerResetStatusBit)
 Retrieves the bit specified by the module power reset status type from the module power reset status register for the specified A/D module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearModulePowerResetStatus (int32_t cardIndex, int32_t module, naibrd_ad_module_power_reset_status_type_t modulePowerResetStatusType)
 Clears the bit specified by the module power reset status type in the module power reset status register for the specified A/D module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_ad_module_power_reset_type_t modulePowerResetType, bool_t modulePowerResetBit)
 Sets the bit specified by the module power reset type in the module power reset register for the specified A/D module. If the bit was set, the hardware will acknowledge it by setting the corresponding bit back to 0. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModulePowerReset (int32_t cardIndex, int32_t module, naibrd_ad_module_power_reset_type_t modulePowerResetType, bool_t *p_outmodulePowerResetBit)
 Retrieves the bit specified by the module power reset type from the module power reset register for the specified A/D module. Feature supported in Motherboard FPGA Version >= X.X.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConvertToRange (uint32_t modId, naibrd_ad_mode_t mode, naibrd_ad_range_polarity_t rangePolarity, naibrd_ad_polarity_t *p_outpolarity, float64_t *p_outrange)
 Retrieves the unipolar/bipolar mode and voltage range associated with the A/D Module ID and raw data code.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConvertToRangeRaw (uint32_t modId, naibrd_ad_mode_t mode, naibrd_ad_polarity_t polarity, float64_t range, naibrd_ad_range_polarity_t *p_outrangePolarity)
 Returns the raw data code associated with the A/D Module ID and the unipolar/bipolar mode and voltage range.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConvertToData (uint32_t modId, naibrd_ad_mode_t mode, naibrd_ad_range_polarity_t rangePolarity, int32_t bufferLength, const uint32_t *p_rawDataBuffer, float64_t **pp_outvoltageBuffer)
 Calculates the voltage in volts associated with the A/D Module ID, given range and raw data.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConvertToDataRaw (uint32_t modId, naibrd_ad_mode_t mode, naibrd_ad_range_polarity_t rangePolarity, int32_t bufferLength, const float64_t *p_voltages, uint32_t **pp_outrawData)
 Calculates the raw voltage associated with the A/D Module ID, given range and voltage.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetRaw (int32_t cardIndex, int32_t module, naibrd_ad_raw_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_AD_GetRaw (int32_t cardIndex, int32_t module, naibrd_ad_raw_t type, uint32_t *p_outrawData)
 Retrieves the raw data value from the register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_channel_raw_t type, uint32_t rawData)
 Sets the raw data value in the register associated to the channel and channel register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_channel_raw_t type, uint32_t *p_outrawData)
 Retrieves the raw data value from the register associated to the channel and channel register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, uint32_t *p_outstatusRaw)
 Retrieves the status of the specified type. The status of a channel is flagged and latched. For Generation 5 AD modules status is latched until cleared. Writing a "1" to the bit will clear the latched status.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ad_chan_mapped_status_type_t statusType, uint32_t statusRaw)
 Clears the status of the specified type. For Generation 5 AD modules, 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_AD_GetEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t accessType, naibrd_ad_event_mapped_category_type_t categoryType, uint32_t *p_outstatusRaw)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ad_event_mapped_category_type_t categoryType, uint32_t statusRaw)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetVoltage (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outvoltage)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetCurrent (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outcurrent)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetTestEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t enable)
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetTestEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t *p_outenable)
 

Variables

static const uint32_t ad_gen5_reg_data [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_DATA_ADD
 
static const uint32_t ad_gen5_reg_range [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_RANGE_ADD
 
static const uint32_t ad_gen5_reg_break_freq [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_BREAK_FREQ_ADD
 
static const uint32_t ad_gen5_reg_power_loss_latched_status [1]
 
static const uint32_t ad_gen5_reg_power_loss_realtime_status [1]
 
static const uint32_t ad_gen5_reg_power_loss_interrupt_enable [1]
 
static const uint32_t ad_gen5_reg_power_loss_trigger [1]
 
static const uint32_t ad_gen5_reg_fifo_latched_status [NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_reg_fifo_realtime_status [NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_reg_fifo_interrupt_enable [NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_reg_fifo_trigger [NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_cf1_reg_data [][NAI_AD_GEN5_CF1_CHANNELS]
 
static const uint32_t ad_gen5_reg_floating_point [][NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_fifo_data [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_AD_DATA_ADD
 
static const uint32_t ad_gen5_fifo_count [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_WDS_IN_BUFF_ADD
 
static const uint32_t ad_gen5_fifo_almost_empty [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_ALMOST_EMPTY_ADD
 
static const uint32_t ad_gen5_fifo_almost_full [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_ALMOST_FULL_ADD
 
static const uint32_t ad_gen5_fifo_hi_thresh [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_HI_THRESHOLD_ADD
 
static const uint32_t ad_gen5_fifo_lo_thresh [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_LOW_THRESHOLD_ADD
 
static const uint32_t ad_gen5_fifo_delay [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_DELAY_ADD
 
static const uint32_t ad_gen5_fifo_size [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_SIZE_ADD
 
static const uint32_t ad_gen5_fifo_skip [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_SKIP_CNT
 
static const uint32_t ad_gen5_fifo_clear [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_CLEAR_ADD
 
static const uint32_t ad_gen5_fifo_ctrl [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_BUFF_CTRL_ADD
 
static const uint32_t ad_gen5_threshold_detect [][NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_threshold_control [][NAI_AD_GEN5_CHANNELS]
 
static const uint32_t ad_gen5_reg_low_saturation_offset [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_LOW_SATURATION_VALUE_ADD
 
static const uint32_t ad_gen5_reg_high_saturation_offset [NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_HIGH_SATURATION_VALUE_ADD
 
static const uint32_t ad_gen5_reg_raw [NAIBRD_AD_RAW_ENUM_COUNT]
 
static const uint32_t *const ad_gen5_reg_chan_raw [NAIBRD_AD_CHAN_RAW_ENUM_COUNT]
 
static const uint32_t *const ad_gen5_cf1_reg_chan_raw [NAIBRD_AD_CHAN_RAW_ENUM_COUNT]
 
static const uint32_t ad_gen5_reg_status [NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t ad_gen5_reg_int_edgelevel [NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t ad_gen5_reg_int_enable [NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const int32_t ad_gen5_int_number [NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t * ad_gen5_reg_event_mapped_latched_status [NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
 
static const uint32_t * ad_gen5_reg_event_mapped_realtime_status [NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
 
static const uint32_t * ad_gen5_reg_event_mapped_interrupt_enable [NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
 
static const uint32_t * ad_gen5_reg_event_mapped_trigger_type [NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
 

Function Documentation

◆ GetChannelCount()

static int32_t GetChannelCount ( uint32_t modId)
static

◆ GetMaxFIFOCount()

static int32_t GetMaxFIFOCount ( uint32_t modId)
static

◆ naibrd_AD_ClearEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ad_event_mapped_status_type_t statusType )

◆ naibrd_AD_ClearEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ad_event_mapped_category_type_t categoryType,
uint32_t statusRaw )

◆ naibrd_AD_ExtractInfoFromEventMappedStatus()

static nai_status_t naibrd_AD_ExtractInfoFromEventMappedStatus ( naibrd_ad_event_mapped_status_type_t statusType,
int32_t channel,
uint32_t * p_outoffset,
uint32_t * p_outshift )
static

◆ naibrd_AD_GetCurrent()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetCurrent ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outcurrent )

◆ naibrd_AD_GetEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ad_event_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

◆ naibrd_AD_GetEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_status_access_type_t accessType,
naibrd_ad_event_mapped_category_type_t categoryType,
uint32_t * p_outstatusRaw )

◆ naibrd_AD_GetFilterBreakFrequency()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetFilterBreakFrequency ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * p_outfreq )

Retrieves the filter break frequency for the specified A/D channel. The break frequency is the 3 db point of a single pole low pass filter. The break frequency can be between 10 Hz to 10 KHz with LSB equal to 1 Hz. Zero indicates a disabled filter.

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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
p_outfreq: (Output) 0 - 10,000 Hz.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AD_GetRangeInfo()

static nai_status_t naibrd_AD_GetRangeInfo ( uint32_t modId,
naibrd_ad_mode_t mode,
uint32_t rawRange,
uint32_t * p_rangeIndex,
float64_t * p_outrange )
static

◆ naibrd_AD_GetRangeInfoRaw()

static nai_status_t naibrd_AD_GetRangeInfoRaw ( uint32_t modId,
naibrd_ad_mode_t mode,
float64_t range,
uint32_t * p_rangeIndex,
uint32_t * p_outrawRange )
static

◆ naibrd_AD_GetVoltage()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetVoltage ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outvoltage )

◆ naibrd_AD_SetFilterBreakFrequency()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetFilterBreakFrequency ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t freq )

Sets the filter break frequency for the specified A/D channel. The break frequency is the 3 db point of a single pole low pass filter. The break frequency can be specified between 10 Hz to 10 KHz with LSB equal to 1 Hz. Zero disables the filter.

The break frequency must not be less than 10% of the clock rate frequency. For example, if the clock rate frequency is 2 KHz, the filter break frequency should be no less than 200 Hz.

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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
freq: (Input) 0 - 10,000 Hz.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_INVALID_VALUE when the break frequency exceeds the sample rate

◆ naibrd_AD_VerifyChanMappedLatchStatusType()

static nai_status_t naibrd_AD_VerifyChanMappedLatchStatusType ( naibrd_ad_chan_mapped_status_type_t statusType)
static

◆ naibrd_AD_VerifyChanMappedStatusType()

static nai_status_t naibrd_AD_VerifyChanMappedStatusType ( naibrd_ad_chan_mapped_status_type_t statusType)
static

◆ naibrd_AD_VerifyChannel()

static nai_status_t naibrd_AD_VerifyChannel ( uint32_t modId,
int32_t channel )
static

◆ naibrd_AD_VerifyChannelRawType()

static nai_status_t naibrd_AD_VerifyChannelRawType ( naibrd_ad_channel_raw_t type)
static

◆ naibrd_AD_VerifyFilterBreakFrequency()

static nai_status_t naibrd_AD_VerifyFilterBreakFrequency ( uint32_t modId,
uint32_t frequency )
static

◆ naibrd_AD_VerifyFloatingPointAttributeType()

static nai_status_t naibrd_AD_VerifyFloatingPointAttributeType ( naibrd_ad_floating_point_attribute_t attribute)
static

◆ naibrd_AD_VerifyMode()

static nai_status_t naibrd_AD_VerifyMode ( naibrd_ad_mode_t mode)
static

◆ naibrd_AD_VerifyPolarityType()

static nai_status_t naibrd_AD_VerifyPolarityType ( naibrd_ad_polarity_t polarity)
static

◆ naibrd_AD_VerifyRawType()

static nai_status_t naibrd_AD_VerifyRawType ( naibrd_ad_raw_t type)
static

Variable Documentation

◆ ad_gen5_cf1_reg_chan_raw

const uint32_t* const ad_gen5_cf1_reg_chan_raw[NAIBRD_AD_CHAN_RAW_ENUM_COUNT]
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static const uint32_t ad_gen5_cf1_reg_data[][NAI_AD_GEN5_CF1_CHANNELS]
Definition naibrd_ad.c:54

◆ ad_gen5_cf1_reg_data

const uint32_t ad_gen5_cf1_reg_data[][NAI_AD_GEN5_CF1_CHANNELS]
static
Initial value:
=
{ NAI_AD_GEN5_CF1_SAMPLED_DATA_ADD, NAI_AD_GEN5_CF1_RMS_DATA_ADD }

◆ ad_gen5_fifo_almost_empty

const uint32_t ad_gen5_fifo_almost_empty[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_ALMOST_EMPTY_ADD
static

◆ ad_gen5_fifo_almost_full

const uint32_t ad_gen5_fifo_almost_full[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_ALMOST_FULL_ADD
static

◆ ad_gen5_fifo_clear

const uint32_t ad_gen5_fifo_clear[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_CLEAR_ADD
static

◆ ad_gen5_fifo_count

const uint32_t ad_gen5_fifo_count[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_WDS_IN_BUFF_ADD
static

◆ ad_gen5_fifo_ctrl

const uint32_t ad_gen5_fifo_ctrl[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_BUFF_CTRL_ADD
static

◆ ad_gen5_fifo_data

const uint32_t ad_gen5_fifo_data[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_AD_DATA_ADD
static

◆ ad_gen5_fifo_delay

const uint32_t ad_gen5_fifo_delay[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_DELAY_ADD
static

◆ ad_gen5_fifo_hi_thresh

const uint32_t ad_gen5_fifo_hi_thresh[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_HI_THRESHOLD_ADD
static

◆ ad_gen5_fifo_lo_thresh

const uint32_t ad_gen5_fifo_lo_thresh[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_LOW_THRESHOLD_ADD
static

◆ ad_gen5_fifo_size

const uint32_t ad_gen5_fifo_size[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_SIZE_ADD
static

◆ ad_gen5_fifo_skip

const uint32_t ad_gen5_fifo_skip[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_FIFO_SKIP_CNT
static

◆ ad_gen5_int_number

const int32_t ad_gen5_int_number[NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
1,
0,
19,
0,
18,
0,
21,
0,
21,
0,
22,
0,
23,
0,
28,
0,
NAI_GEN5_SUMMARY_INTERRUPT_NUM,
0
}

◆ ad_gen5_reg_break_freq

const uint32_t ad_gen5_reg_break_freq[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_BREAK_FREQ_ADD
static

◆ ad_gen5_reg_chan_raw

const uint32_t* const ad_gen5_reg_chan_raw[NAIBRD_AD_CHAN_RAW_ENUM_COUNT]
static
Initial value:
=
{
ad_gen5_threshold_hysteresis[0],
ad_gen5_threshold_hysteresis[1],
NULL
}
static const uint32_t ad_gen5_reg_data[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:32
static const uint32_t ad_gen5_reg_low_saturation_offset[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:92
static const uint32_t ad_gen5_reg_range[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:33
static const uint32_t ad_gen5_threshold_control[][NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:83
static const uint32_t ad_gen5_threshold_detect[][NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:81
static const uint32_t ad_gen5_reg_break_freq[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:34
static const uint32_t ad_gen5_reg_high_saturation_offset[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:93

◆ ad_gen5_reg_data

const uint32_t ad_gen5_reg_data[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_DATA_ADD
static

◆ ad_gen5_reg_event_mapped_interrupt_enable

const uint32_t* ad_gen5_reg_event_mapped_interrupt_enable[NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
static
Initial value:
=
{
}
static const uint32_t ad_gen5_reg_fifo_interrupt_enable[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:49
static const uint32_t ad_gen5_reg_power_loss_interrupt_enable[1]
Definition naibrd_ad.c:40

◆ ad_gen5_reg_event_mapped_latched_status

const uint32_t* ad_gen5_reg_event_mapped_latched_status[NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
static
Initial value:
=
{
}
static const uint32_t ad_gen5_reg_fifo_latched_status[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:45
static const uint32_t ad_gen5_reg_power_loss_latched_status[1]
Definition naibrd_ad.c:36

◆ ad_gen5_reg_event_mapped_realtime_status

const uint32_t* ad_gen5_reg_event_mapped_realtime_status[NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
static
Initial value:
=
{
}
static const uint32_t ad_gen5_reg_power_loss_realtime_status[1]
Definition naibrd_ad.c:38
static const uint32_t ad_gen5_reg_fifo_realtime_status[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:47

◆ ad_gen5_reg_event_mapped_trigger_type

const uint32_t* ad_gen5_reg_event_mapped_trigger_type[NAIBRD_AD_EVENT_MAPPED_CATEGORY_TYPE_ENUM_COUNT]
static
Initial value:
=
{
}
static const uint32_t ad_gen5_reg_power_loss_trigger[1]
Definition naibrd_ad.c:42
static const uint32_t ad_gen5_reg_fifo_trigger[NAI_AD_GEN5_CHANNELS]
Definition naibrd_ad.c:51

◆ ad_gen5_reg_fifo_interrupt_enable

const uint32_t ad_gen5_reg_fifo_interrupt_enable[NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
NAI_AD_GEN5_FIFO_INT_ENABLE_ADD

◆ ad_gen5_reg_fifo_latched_status

const uint32_t ad_gen5_reg_fifo_latched_status[NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
NAI_AD_GEN5_FIFO_LATCHED_STATUS_ADD

◆ ad_gen5_reg_fifo_realtime_status

const uint32_t ad_gen5_reg_fifo_realtime_status[NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
NAI_AD_GEN5_FIFO_REALTIME_STATUS_ADD

◆ ad_gen5_reg_fifo_trigger

const uint32_t ad_gen5_reg_fifo_trigger[NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
NAI_AD_GEN5_FIFO_EDGE_LEVEL_INT_ADD

◆ ad_gen5_reg_floating_point

const uint32_t ad_gen5_reg_floating_point[][NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
{ NAI_AD_GEN5_FLOAT_OFFSET_ADD , NAI_AD_GEN5_FLOAT_SCALE_FACTOR_ADD }

◆ ad_gen5_reg_high_saturation_offset

const uint32_t ad_gen5_reg_high_saturation_offset[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_HIGH_SATURATION_VALUE_ADD
static

◆ ad_gen5_reg_int_edgelevel

const uint32_t ad_gen5_reg_int_edgelevel[NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_AD_GEN5_BIT_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_OPEN_OVERVOLT_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_OVERCURRENT_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_THRESHOLD_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_THRESHOLD_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_FAF_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_SATURATION_EDGE_LEVEL_INT_ADD,
0u,
NAI_AD_GEN5_REG_INTER_FPGA_FAULT_EDGE_LEVEL_INT_ADD,
0u,
NAI_GEN5_SUMMARY_INTERRUPT_EDGE_LEVEL_MODE_ADD,
0u,
}

◆ ad_gen5_reg_int_enable

const uint32_t ad_gen5_reg_int_enable[NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_AD_GEN5_BIT_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_OPEN_OVERVOLT_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_OVERCURRENT_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_THRESHOLD_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_THRESHOLD_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_FAF_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_SATURATION_INT_ENABLE_ADD,
0u,
NAI_AD_GEN5_REG_INTER_FPGA_FAULT_STATUS_INT_ENABLE_ADD,
0,
NAI_GEN5_SUMMARY_INTERRUPT_ENABLE_ADD,
0u,
}

◆ ad_gen5_reg_low_saturation_offset

const uint32_t ad_gen5_reg_low_saturation_offset[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_LOW_SATURATION_VALUE_ADD
static

◆ ad_gen5_reg_power_loss_interrupt_enable

const uint32_t ad_gen5_reg_power_loss_interrupt_enable[1]
static
Initial value:
=
{ NAI_AD_GEN5_EXT_PWR_LOSS_INT_ENABLE_ADD }

◆ ad_gen5_reg_power_loss_latched_status

const uint32_t ad_gen5_reg_power_loss_latched_status[1]
static
Initial value:
=
{ NAI_AD_GEN5_EXT_PWR_LOSS_LATCHED_STATUS_ADD }

◆ ad_gen5_reg_power_loss_realtime_status

const uint32_t ad_gen5_reg_power_loss_realtime_status[1]
static
Initial value:
=
{ NAI_AD_GEN5_EXT_PWR_LOSS_REALTIME_STATUS_ADD }

◆ ad_gen5_reg_power_loss_trigger

const uint32_t ad_gen5_reg_power_loss_trigger[1]
static
Initial value:
=
{ NAI_AD_GEN5_EXT_PWR_LOSS_EDGE_LEVEL_INT_ADD }

◆ ad_gen5_reg_range

const uint32_t ad_gen5_reg_range[NAI_AD_GEN5_CHANNELS] = NAI_AD_GEN5_RANGE_ADD
static

◆ ad_gen5_reg_raw

const uint32_t ad_gen5_reg_raw[NAIBRD_AD_RAW_ENUM_COUNT]
static
Initial value:
=
{
NAI_AD_GEN5_CLK_RATE_ADD,
NAI_AD_GEN5_CLK_RATE_ADD,
NAI_AD_GEN5_TEST_ENABLE_ADD,
NAI_AD_GEN5_D0_TEST_POLARITY_ADD,
NAI_AD_GEN5_D0_TEST_VOLTAGE_ADD,
NAI_AD_GEN5_IV_CTRL,
NAI_AD_GEN5_ACTIVE_CHANNELS_ADD,
NAI_AD_GEN5_BIT_INT_ENABLE_ADD,
NAI_AD_GEN5_OPEN_OVERVOLT_INT_ENABLE_ADD,
NAI_AD_GEN5_OVERCURRENT_INT_ENABLE_ADD,
NAI_AD_GEN5_POWER_ENABLE_ADD,
NAI_AD_GEN5_THRESHOLD_INT_ENABLE_ADD,
NAI_AD_GEN5_THRESHOLD_CONTROL_ADD,
NAI_AD_GEN5_FAF_INT_ENABLE_ADD,
NAI_AD_GEN5_SATURATION_INT_ENABLE_ADD,
NAI_AD_GEN5_REG_INTER_FPGA_FAULT_STATUS_INT_ENABLE_ADD
}

◆ ad_gen5_reg_status

const uint32_t ad_gen5_reg_status[NAIBRD_AD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_AD_GEN5_BIT_LATCHED_STATUS_ADD,
NAI_AD_GEN5_BIT_REALTIME_STATUS_ADD,
NAI_AD_GEN5_OPEN_OVERVOLT_LATCHED_STATUS_ADD,
NAI_AD_GEN5_OPEN_OVERVOLT_REALTIME_STATUS_ADD,
NAI_AD_GEN5_OVERCURRENT_LATCHED_STATUS_ADD,
NAI_AD_GEN5_OVERCURRENT_REALTIME_STATUS_ADD,
NAI_AD_GEN5_THRESHOLD_LATCHED_STATUS_ADD,
NAI_AD_GEN5_THRESHOLD_REALTIME_STATUS_ADD,
NAI_AD_GEN5_THRESHOLD_LATCHED_STATUS_ADD,
NAI_AD_GEN5_THRESHOLD_REALTIME_STATUS_ADD,
NAI_AD_GEN5_FAF_LATCHED_STATUS_ADD,
NAI_AD_GEN5_FAF_REALTIME_STATUS_ADD,
NAI_AD_GEN5_SATURATION_LATCHED_STATUS_ADD,
NAI_AD_GEN5_SATURATION_REALTIME_STATUS_ADD,
NAI_AD_GEN5_REG_INTER_FPGA_FAULT_LATCHED_STATUS_ADD,
NAI_AD_GEN5_REG_INTER_FPGA_FAULT_REALTIME_STATUS_ADD,
NAI_GEN5_SUMMARY_STATUS_LATCHED_ADD,
NAI_GEN5_SUMMARY_STATUS_REAL_TIME_ADD
}

◆ ad_gen5_threshold_control

const uint32_t ad_gen5_threshold_control[][NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
{ NAI_AD_GEN5_THRESHOLD1_CONTROL_ADD, NAI_AD_GEN5_THRESHOLD2_CONTROL_ADD }

◆ ad_gen5_threshold_detect

const uint32_t ad_gen5_threshold_detect[][NAI_AD_GEN5_CHANNELS]
static
Initial value:
=
{ NAI_AD_GEN5_THRESHOLD1_DETECT_ADD, NAI_AD_GEN5_THRESHOLD2_DETECT_ADD }