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

Enumerations

enum  da_basic_interrupt_commands { DA_SUMMARY_INTERRUPT_CMD_CONFIGURE , DA_SUMMARY_INTERRUPT_CMD_STATUS_READ , DA_SUMMARY_INTERRUPT_CMD_STATUS_CLEAR , DA_SUMMARY_INTERRUPT_CMD_COUNT }
 

Functions

static int32_t Run_DA_Summary (int32_t cardIndex, int32_t module, uint32_t modid)
 Run_DA_Summary prompts the user for the card, module and channel to use for the application and calls Cfg_DA_Channel if the card, module, and channel specified are all valid for the DA module.
 
static void Cfg_DA_Channel (int32_t cardIndex, int32_t module, int32_t MaxChannel)
 Cfg_DA_Channel handles calling the Display_DA_ChannelCfg routine to display the D/A channel configuration and calling the routines associated with the user's menu commands.
 
static void Verify_DA_ParamCnt (int32_t paramCnt)
 Verify_DA_ParamCnt verifies parameter count and displays error message if invalid.
 
static nai_status_t Display_DA_Status (int32_t paramCnt, int32_t *p_params)
 Display_DA_Status illustrates the methods to call in the naibrd library to retrieve the status states.
 
static nai_status_t Clear_DA_Status (int32_t paramCnt, int32_t *p_params)
 
static nai_status_t Configure_DA_Interrupt (int32_t paramCnt, int32_t *p_params)
 
static void SampleCallBack (uint32_t vector)
 
int32_t da_summary (void)
 The purpose of the da_summary example is to illustrate the methods to call in the naibrd library to perform basic operations with D/A modules for interrupt configuration, reading fault statuses including the summary status register, and clearing status bits. The summary register is bit-mapped by channel (bit index zero is channel 1) and reports a '1' if the corresponding channel has detected a fault (including BIT). A latched summary bit can be cleared by writing a '1' to the bit.
 

Variables

static const int8_t * DEF_CONFIG_FILE = (const int8_t *)"default_DA_Summary.txt"
 
static const int32_t DEF_DA_CARD_INDEX = 0
 
static const int32_t DEF_DA_MODULE = 1
 
static const int32_t DEF_DA_CHANNEL = 1
 
static naiapp_cmdtbl_params_t DA_SummaryMenuCmds []
 

Enumeration Type Documentation

◆ da_basic_interrupt_commands

Enumerator
DA_SUMMARY_INTERRUPT_CMD_CONFIGURE 
DA_SUMMARY_INTERRUPT_CMD_STATUS_READ 
DA_SUMMARY_INTERRUPT_CMD_STATUS_CLEAR 
DA_SUMMARY_INTERRUPT_CMD_COUNT 

Function Documentation

◆ Cfg_DA_Channel()

static void Cfg_DA_Channel ( int32_t cardIndex,
int32_t module,
int32_t MaxChannel )
static

Cfg_DA_Channel handles calling the Display_DA_ChannelCfg routine to display the D/A channel configuration and calling the routines associated with the user's menu commands.

◆ Clear_DA_Status()

static nai_status_t Clear_DA_Status ( int32_t paramCnt,
int32_t * p_params )
static

◆ Configure_DA_Interrupt()

static nai_status_t Configure_DA_Interrupt ( int32_t paramCnt,
int32_t * p_params )
static

◆ da_summary()

int32_t da_summary ( void )

The purpose of the da_summary example is to illustrate the methods to call in the naibrd library to perform basic operations with D/A modules for interrupt configuration, reading fault statuses including the summary status register, and clearing status bits. The summary register is bit-mapped by channel (bit index zero is channel 1) and reports a '1' if the corresponding channel has detected a fault (including BIT). A latched summary bit can be cleared by writing a '1' to the bit.

◆ Display_DA_Status()

static nai_status_t Display_DA_Status ( int32_t paramCnt,
int32_t * p_params )
static

Display_DA_Status illustrates the methods to call in the naibrd library to retrieve the status states.

◆ Run_DA_Summary()

static int32_t Run_DA_Summary ( int32_t cardIndex,
int32_t module,
uint32_t modid )
static

Run_DA_Summary prompts the user for the card, module and channel to use for the application and calls Cfg_DA_Channel if the card, module, and channel specified are all valid for the DA module.

◆ SampleCallBack()

static void SampleCallBack ( uint32_t vector)
static

◆ Verify_DA_ParamCnt()

static void Verify_DA_ParamCnt ( int32_t paramCnt)
static

Verify_DA_ParamCnt verifies parameter count and displays error message if invalid.

Variable Documentation

◆ DA_SummaryMenuCmds

naiapp_cmdtbl_params_t DA_SummaryMenuCmds[]
static
Initial value:
= {
{"INT", "DA Configure Interrupt", DA_SUMMARY_INTERRUPT_CMD_CONFIGURE, Configure_DA_Interrupt},
}
@ DA_SUMMARY_INTERRUPT_CMD_STATUS_READ
Definition da_summary.c:43
@ DA_SUMMARY_INTERRUPT_CMD_STATUS_CLEAR
Definition da_summary.c:44
@ DA_SUMMARY_INTERRUPT_CMD_CONFIGURE
Definition da_summary.c:42
static nai_status_t Configure_DA_Interrupt(int32_t paramCnt, int32_t *p_params)
Definition da_summary.c:297
static nai_status_t Display_DA_Status(int32_t paramCnt, int32_t *p_params)
Display_DA_Status illustrates the methods to call in the naibrd library to retrieve the status states...
Definition da_summary.c:233
static nai_status_t Clear_DA_Status(int32_t paramCnt, int32_t *p_params)
Definition da_summary.c:275

◆ DEF_CONFIG_FILE

const int8_t* DEF_CONFIG_FILE = (const int8_t *)"default_DA_Summary.txt"
static

◆ DEF_DA_CARD_INDEX

const int32_t DEF_DA_CARD_INDEX = 0
static

◆ DEF_DA_CHANNEL

const int32_t DEF_DA_CHANNEL = 1
static

◆ DEF_DA_MODULE

const int32_t DEF_DA_MODULE = 1
static