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

Functions

static nai_status_t naibrd_CD_VerifyChannel (uint32_t modId, int32_t channel)
 
static nai_status_t naibrd_CD_VerifyChanMappedStatusType (naibrd_cd_chan_mapped_status_type_t statusType)
 
static nai_status_t naibrd_CD_VerifyChanMappedLatchStatusType (naibrd_cd_chan_mapped_status_type_t statusType)
 
static nai_status_t naibrd_CD_VerifyInterruptTriggerType (naibrd_int_trigger_type_t triggerType)
 
static nai_status_t naibrd_CD_VerifyInterruptSteeringType (naibrd_int_steering_t steeringType)
 
static nai_status_t naibrd_CD_VerifyBitStatusType (naibrd_cd_bit_status_type_t bitstatusType)
 
static nai_status_t naibrd_CD_VerifyBoolean (bool_t enable)
 
static nai_status_t naibrd_CD_VerifyEnergySetting (float32_t energySetting)
 
static nai_status_t naibrd_CD_VerifyResistanceSetting (int32_t resistanceThreshold)
 
static nai_status_t naibrd_CD_VerifyAutoBurnMaxCountSetting (int32_t autoBurnMaxCount)
 
NAIBRDFUNC int32_t NAIAPI naibrd_CD_GetChannelCount (uint32_t modId)
 Returns the number of channels for the specified Chip Detect Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetBitStatus (int32_t cardIndex, int32_t module, naibrd_cd_bit_status_type_t type, nai_status_bit_t *p_outstatusBit)
 Retrieves the bit status for the specified bit status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the status for the specified Chip Detect channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType)
 Clears the latched or realtime status for the specified Chip Detect channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetEnabledChannels (int32_t cardIndex, int32_t module, uint32_t enableChannelsMask)
 Enables the specified channels based upon the bits set in the enableChannelsMask param passed in.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetEnabledChannels (int32_t cardIndex, int32_t module, uint32_t *p_outenabledChannels)
 Retrieves the 32 bit value whereby the first 6 bits determine which of the 6 channels are enabled.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_InitiateManualBurnChannels (int32_t cardIndex, int32_t module, uint32_t manualBurnChannelsMask)
 Initiates manual burn on the channels specified in the manualBurnChannelsMask param passed in.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetManualBurnChannels (int32_t cardIndex, int32_t module, uint32_t *p_outmanualBurnChannels)
 Retrieves which channels are currently performing a manual burn.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetAutoBurnMaxCount (int32_t cardIndex, int32_t module, int32_t channel, int32_t autoBurnMaxCount)
 Specifies the given channel's Auto Burn Max Count. Once Auto burn is initiated, it will burn up to the specified count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetAutoBurnMaxCount (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outautoBurnMaxCount)
 Retrieves the the given channel's Auto Burn Max Count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetAutoBurnCount (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outautoBurnCount)
 Retrieves the the given channel's Auto Burn Count. This is the actual Auto Burn Count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_InitiateAutoBurnChannels (int32_t cardIndex, int32_t module, uint32_t autoBurnChannelsMask)
 Initiates auto burn on the channels specified in the autoBurnChannelsMask param passed in.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetAutoBurnChannels (int32_t cardIndex, int32_t module, uint32_t *p_outautoBurnChannels)
 Retrieves which channels are currently performing a auto burn.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanEnergySetting (int32_t cardIndex, int32_t module, int32_t channel, float32_t energySetting)
 Specifies the given channel's energy level in Joules. When a burn takes place this is the energy level at which the burn will be configured.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanEnergySetting (int32_t cardIndex, int32_t module, int32_t channel, float32_t *p_outenergySetting)
 Retrieves the given channel's energy level in Joules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanResistance (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outresistance)
 Retrieves the given channel's measured resistance (in ohms).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanFaultResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t faultResistanceThreshold)
 Specifies the given channel's fault resistance threshold. If measured resistance drops below this value, a burn is needed (either auto or manual) until the measured resistance raises above this minimum value set.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanFaultResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outfaultResistanceThreshold)
 Retrieves the given channel's fault resistance threshold.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanWarningResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t warningResistanceThreshold)
 Specifies the given channel's warning resistance threshold.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanWarningResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outwarningResistanceThreshold)
 Retrieves the given channel's warning resistance threshold.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanOpenResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t openResistanceThreshold)
 Specifies the given channel's open resistance threshold.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanOpenResistanceThreshold (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outopenResistanceThreshold)
 Retrieves the given channel's open resistance threshold.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables/disables status reporting for the specified CD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable)
 Retrieves the enabled/disabled state of status reporting for the specified CD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_cd_test_type_t type, bool_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_cd_test_type_t type, bool_t *p_outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_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_CD_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_CD_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_CD_ClearModuleBITLogic (int32_t cardIndex, int32_t module)
 Resets the Continuous BIT internal circuitry and counter mechanism for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType, bool_t enable)
 Sets the Interrupt Enable for the specified Chip Detect channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType, bool_t *p_outenable)
 Retrieves the Interrupt Enable for the specified Chip Detect channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t triggerType)
 Sets the Interrupt Edge/Level property for the specified Chip Detect channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptTriggerType (int32_t cardIndex, int32_t module, int32_t channel, naibrd_cd_chan_mapped_status_type_t statusType, naibrd_int_trigger_type_t *p_outtriggerType)
 Retrieves the Interrupt Edge/Level property for the specified Chip Detect channel and interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, uint32_t vector)
 Sets the Interrupt Vector for the specified Chip Detect interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptVector (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, uint32_t *p_outVector)
 Retrieves the Interrupt Vector for the specified Chip Detect interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptSteering (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, naibrd_int_steering_t *p_outSteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified interrupt status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, uint32_t *p_outstatusRaw)
 Retrieves the raw status data value in the register associated to the status type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_ClearChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_cd_chan_mapped_status_type_t statusType, uint32_t statusRaw)
 Clears the status data value in the register associated to the status type specified. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE. NOTE: If NAIBRD_CD_STATUS_BIT_LATCHED is passed in for statusType, the value of statusRaw will be irrelevant. All channels will be cleared.
 

Variables

static const uint32_t CD_GEN5_EnergySettingRegAddr [] = NAI_CD_GEN5_ENERGY_SETTING_ADD
 
static const uint32_t CD_GEN5_ResistanceRegAddr [] = NAI_CD_GEN5_CHAN_RESISTANCE_ADD
 
static const uint32_t CD_GEN5_FaultResistanceThresholdRegAddr [] = NAI_CD_GEN5_FAULT_RESISTANCE_THRESHOLD_ADD
 
static const uint32_t CD_GEN5_WarningResistanceThresholdRegAddr [] = NAI_CD_GEN5_WARNING_RESISTANCE_THRESHOLD_ADD
 
static const uint32_t CD_GEN5_OpenResistanceThresholdRegAddr [] = NAI_CD_GEN5_OPEN_RESISTANCE_THRESHOLD_ADD
 
static const uint32_t CD_GEN5_AutoBurnMaxCount [] = NAI_CD_GEN5_AUTO_BURN_MAX_COUNT_ADD
 
static const uint32_t CD_GEN5_AutoBurnCount [] = NAI_CD_GEN5_AUTO_BURN_COUNT_ADD
 
static uint32_t cd_reg_chan_mapped_status [NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t cd_reg_int_enable [NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const uint32_t cd_reg_int_type [NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 
static const int32_t cd_interrupt_num [NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
 

Function Documentation

◆ naibrd_CD_ClearChanMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_ClearChanMappedStatusRaw ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
uint32_t statusRaw )

Clears the status data value in the register associated to the status type specified. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE. NOTE: If NAIBRD_CD_STATUS_BIT_LATCHED is passed in for statusType, the value of statusRaw will be irrelevant. All channels will be cleared.

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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
statusRaw: (Input) Raw Data Code.
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_VALUE when invalid status register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_GetChanMappedInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_cd_chan_mapped_status_type_t statusType,
bool_t * p_outenable )

Retrieves the Interrupt Enable for the specified Chip Detect channel and interrupt status type.

Note
If NAIBRD_CD_STATUS_BIT_LATCHED or NAIBRD_CD_STATUS_BIT_REALTIME is passed in for statusType, the channel will be irrelevant, p_outenable will indicate all channels.
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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
p_outenable: (Output) 0 to disable, 1 to enable interrupt.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_GetChanMappedInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
naibrd_int_steering_t * p_outSteering )

Retrieves the Interrupt Steering which indicates the interrupt direction for the specified interrupt status type.

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]).
statusType: (Input) Status Type: refer to nai_cd_status_type_t definition.
p_outSteering: (Output) Interrupt Steering.
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_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_GetChanMappedInterruptTriggerType()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptTriggerType ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_cd_chan_mapped_status_type_t statusType,
naibrd_int_trigger_type_t * p_outtriggerType )

Retrieves the Interrupt Edge/Level property for the specified Chip Detect channel and interrupt status type.

Note
If NAIBRD_CD_STATUS_BIT_LATCHED or NAIBRD_CD_STATUS_BIT_REALTIME is passed in for statusType, the channel will be irrelevant. p_outtriggerType will indicate all channels.
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]).
statusType: (Input) Status Type: refer to nai_cd_status_type_t definition.
p_outtriggerType: (Output) Interrupt trigger type (NAIBRD_INT_TRIGGER_TYPE_EDGE or NAIBRD_INT_TRIGGER_TYPE_LEVEL).
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_GetChanMappedInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedInterruptVector ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
uint32_t * p_outVector )

Retrieves the Interrupt Vector for the specified Chip Detect interrupt status type.

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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
p_outVector: (Output) Interrupt Vector uint32_t.
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_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_GetChanMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetChanMappedStatusRaw ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
uint32_t * p_outstatusRaw )

Retrieves the raw status data value in the register associated to the status type specified.

Note
If NAIBRD_CD_STATUS_BIT_LATCHED or NAIBRD_CD_STATUS_BIT_REALTIME is passed in for statusType, the output value of p_outstatusRaw will be a 0 or 1, which is indicated for all channels.
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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
p_outstatusRaw: (Output) Raw Data Code.
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_VALUE when invalid status register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_SetChanMappedInterruptEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_cd_chan_mapped_status_type_t statusType,
bool_t enable )

Sets the Interrupt Enable for the specified Chip Detect channel and interrupt status type.

Note
If NAIBRD_CD_STATUS_BIT_LATCHED or NAIBRD_CD_STATUS_BIT_REALTIME is passed in for statusType, the channel will be irrelevant. The interrupt will fire once and will indicate all channels.
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]).
statusType: (Input) Status Type: refer to naibrd_dt_chan_mapped_status_type_t definition.
enable: (Input) 0 to disable, 1 to enable interrupt.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_SetChanMappedInterruptSteering()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptSteering ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
naibrd_int_steering_t steering )

Sets the Interrupt Steering which indicates the interrupt direction for the specified interrupt status type.

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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
steering: (Input) Interrupt Steering: refer to naibrd_int_steering_t definition.
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_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_SetChanMappedInterruptTriggerType()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptTriggerType ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_cd_chan_mapped_status_type_t statusType,
naibrd_int_trigger_type_t triggerType )

Sets the Interrupt Edge/Level property for the specified Chip Detect channel and interrupt status type.

Note
If NAIBRD_CD_STATUS_BIT_LATCHED or NAIBRD_CD_STATUS_BIT_REALTIME is passed in for statusType, the channel will be irrelevant. The interrupt will fire once and will indicate all channels.
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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
triggerType: (Input) Interrupt trigger type (NAIBRD_INT_TRIGGER_TYPE_EDGE or NAIBRD_INT_TRIGGER_TYPE_LEVEL).
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_SetChanMappedInterruptVector()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_SetChanMappedInterruptVector ( int32_t cardIndex,
int32_t module,
naibrd_cd_chan_mapped_status_type_t statusType,
uint32_t vector )

Sets the Interrupt Vector for the specified Chip Detect interrupt status type.

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]).
statusType: (Input) Status Type: refer to naibrd_cd_chan_mapped_status_type_t definition.
vector: (Input) Interrupt Vector.
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_VALUE when invalid group register type is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_CD_VerifyAutoBurnMaxCountSetting()

static nai_status_t naibrd_CD_VerifyAutoBurnMaxCountSetting ( int32_t autoBurnMaxCount)
static

◆ naibrd_CD_VerifyBitStatusType()

static nai_status_t naibrd_CD_VerifyBitStatusType ( naibrd_cd_bit_status_type_t bitstatusType)
static

◆ naibrd_CD_VerifyBoolean()

static nai_status_t naibrd_CD_VerifyBoolean ( bool_t enable)
static

◆ naibrd_CD_VerifyChanMappedLatchStatusType()

static nai_status_t naibrd_CD_VerifyChanMappedLatchStatusType ( naibrd_cd_chan_mapped_status_type_t statusType)
static

◆ naibrd_CD_VerifyChanMappedStatusType()

static nai_status_t naibrd_CD_VerifyChanMappedStatusType ( naibrd_cd_chan_mapped_status_type_t statusType)
static

◆ naibrd_CD_VerifyChannel()

static nai_status_t naibrd_CD_VerifyChannel ( uint32_t modId,
int32_t channel )
static

◆ naibrd_CD_VerifyEnergySetting()

static nai_status_t naibrd_CD_VerifyEnergySetting ( float32_t energySetting)
static

◆ naibrd_CD_VerifyInterruptSteeringType()

static nai_status_t naibrd_CD_VerifyInterruptSteeringType ( naibrd_int_steering_t steeringType)
static

◆ naibrd_CD_VerifyInterruptTriggerType()

static nai_status_t naibrd_CD_VerifyInterruptTriggerType ( naibrd_int_trigger_type_t triggerType)
static

◆ naibrd_CD_VerifyResistanceSetting()

static nai_status_t naibrd_CD_VerifyResistanceSetting ( int32_t resistanceThreshold)
static

Variable Documentation

◆ CD_GEN5_AutoBurnCount

const uint32_t CD_GEN5_AutoBurnCount[] = NAI_CD_GEN5_AUTO_BURN_COUNT_ADD
static

◆ CD_GEN5_AutoBurnMaxCount

const uint32_t CD_GEN5_AutoBurnMaxCount[] = NAI_CD_GEN5_AUTO_BURN_MAX_COUNT_ADD
static

◆ CD_GEN5_EnergySettingRegAddr

const uint32_t CD_GEN5_EnergySettingRegAddr[] = NAI_CD_GEN5_ENERGY_SETTING_ADD
static

◆ CD_GEN5_FaultResistanceThresholdRegAddr

const uint32_t CD_GEN5_FaultResistanceThresholdRegAddr[] = NAI_CD_GEN5_FAULT_RESISTANCE_THRESHOLD_ADD
static

◆ CD_GEN5_OpenResistanceThresholdRegAddr

const uint32_t CD_GEN5_OpenResistanceThresholdRegAddr[] = NAI_CD_GEN5_OPEN_RESISTANCE_THRESHOLD_ADD
static

◆ CD_GEN5_ResistanceRegAddr

const uint32_t CD_GEN5_ResistanceRegAddr[] = NAI_CD_GEN5_CHAN_RESISTANCE_ADD
static

◆ CD_GEN5_WarningResistanceThresholdRegAddr

const uint32_t CD_GEN5_WarningResistanceThresholdRegAddr[] = NAI_CD_GEN5_WARNING_RESISTANCE_THRESHOLD_ADD
static

◆ cd_interrupt_num

const int32_t cd_interrupt_num[NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
= {
NAI_CD_GEN5_BIT_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_BIT_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_FAULT_RES_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_FAULT_RES_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_WARN_RES_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_WARN_RES_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_OPEN_RES_INT_VECTOR_STEERING_INTNUM,
NAI_CD_GEN5_OPEN_RES_INT_VECTOR_STEERING_INTNUM,
NAI_GEN5_SUMMARY_INTERRUPT_NUM,
NAI_GEN5_SUMMARY_INTERRUPT_NUM,
}

◆ cd_reg_chan_mapped_status

uint32_t cd_reg_chan_mapped_status[NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
=
{
NAI_CD_GEN5_BIT_STATUS_LATCHED_ADD,
NAI_CD_GEN5_BIT_STATUS_REALTIME_ADD,
NAI_CD_GEN5_FAULT_RES_LATCHED_STATUS_ADD,
NAI_CD_GEN5_FAULT_RES_REALTIME_STATUS_ADD,
NAI_CD_GEN5_WARN_RES_LATCHED_STATUS_ADD,
NAI_CD_GEN5_WARN_RES_REALTIME_STATUS_ADD,
NAI_CD_GEN5_OPEN_RES_LATCHED_STATUS_ADD,
NAI_CD_GEN5_OPEN_RES_REALTIME_STATUS_ADD,
NAI_GEN5_SUMMARY_STATUS_LATCHED_ADD,
NAI_GEN5_SUMMARY_STATUS_REAL_TIME_ADD
}

◆ cd_reg_int_enable

const uint32_t cd_reg_int_enable[NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
= {
NAI_CD_GEN5_BIT_INT_ENABLE_ADD,
NAI_CD_GEN5_BIT_INT_ENABLE_ADD,
NAI_CD_GEN5_FAULT_RES_INT_ENABLE_ADD,
NAI_CD_GEN5_FAULT_RES_INT_ENABLE_ADD,
NAI_CD_GEN5_WARN_RES_INT_ENABLE_ADD,
NAI_CD_GEN5_WARN_RES_INT_ENABLE_ADD,
NAI_CD_GEN5_OPEN_RES_INT_ENABLE_ADD,
NAI_CD_GEN5_OPEN_RES_INT_ENABLE_ADD,
NAI_GEN5_SUMMARY_INTERRUPT_ENABLE_ADD,
NAI_GEN5_SUMMARY_INTERRUPT_ENABLE_ADD
}

◆ cd_reg_int_type

const uint32_t cd_reg_int_type[NAIBRD_CD_CHAN_MAPPED_STATUS_TYPE_ENUM_COUNT]
static
Initial value:
= {
NAI_CD_GEN5_BIT_INT_EDGE_LEVEL_MODE_ADD,
NAI_CD_GEN5_BIT_INT_EDGE_LEVEL_MODE_ADD,
NAI_CD_GEN5_FAULT_RES_EDGE_LEVEL_INT_ADD,
NAI_CD_GEN5_FAULT_RES_EDGE_LEVEL_INT_ADD,
NAI_CD_GEN5_WARN_RES_EDGE_LEVEL_INT_ADD,
NAI_CD_GEN5_WARN_RES_EDGE_LEVEL_INT_ADD,
NAI_CD_GEN5_OPEN_RES_EDGE_LEVEL_INT_ADD,
NAI_CD_GEN5_OPEN_RES_EDGE_LEVEL_INT_ADD,
NAI_GEN5_SUMMARY_INTERRUPT_EDGE_LEVEL_MODE_ADD,
NAI_GEN5_SUMMARY_INTERRUPT_EDGE_LEVEL_MODE_ADD
}