|
static int32_t | Run_DT_Summary (int32_t cardIndex, int32_t module, uint32_t modid) |
| Run_DT_Summary prompts the user for the card, module and channel to use for the application and calls Cfg_DT_Channel if the card, module, channel is valid for as a discrete module.
|
|
static void | Cfg_DT_Channel (int32_t cardIndex, int32_t module, int32_t MaxChannel) |
| Cfg_DT_Channel handles calling the Display_DT_ChannelCfg routine to display the discrete channel configuration and calling the routines associated with the user's menu commands.
|
|
static void | Verify_DT_ParamCnt (int32_t paramCnt) |
| Verify_DT_ParamCnt verifies parameter count and displays error message if invalid.
|
|
static nai_status_t | Display_DT_Status (int32_t paramCnt, int32_t *p_params) |
| Display_DT_Status illustrate the methods to call in the naibrd library to retrieve the status states.
|
|
static nai_status_t | Clear_DT_Status (int32_t paramCnt, int32_t *p_params) |
|
static nai_status_t | Force_BIT_Error (int32_t paramCnt, int32_t *p_params) |
|
static nai_status_t | Configure_DT_Interrupt (int32_t paramCnt, int32_t *p_params) |
|
static void | SampleCallBack (uint32_t vector) |
|
int32_t | dt_summary (void) |
| The purpose of the dt_summary example is to illustrate the methods to call in the naibrd library to perform basic operations with the discrete modules for interrupt configuration, reading fault statuses including the summary status register, clearing status bits and forcing a BIT error to observe status bits getting set in both the BIT status and summary registers. 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 in either BIT or over-current status. A latched summary bit can be cleared by writing a '1' to the bit. A BIT error condition can be forced in a DT channel by configuring the IO format for Push-Pull and setting the output state HIGH while an external VCC is unconnected. To demonstrate the aforementioned concepts, the user should run this sample application and enter the following sequence of menu commands (though in reality the user is free to follow any sequence):
|
|
int32_t dt_summary |
( |
void | | ) |
|
The purpose of the dt_summary example is to illustrate the methods to call in the naibrd library to perform basic operations with the discrete modules for interrupt configuration, reading fault statuses including the summary status register, clearing status bits and forcing a BIT error to observe status bits getting set in both the BIT status and summary registers. 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 in either BIT or over-current status. A latched summary bit can be cleared by writing a '1' to the bit. A BIT error condition can be forced in a DT channel by configuring the IO format for Push-Pull and setting the output state HIGH while an external VCC is unconnected. To demonstrate the aforementioned concepts, the user should run this sample application and enter the following sequence of menu commands (though in reality the user is free to follow any sequence):
clear - to clear all latched status registers (BIT, Overcurrent and Summary statuses) stat - to display all latched statuses int - to configure the interrupt subsystem on the user-selected channel fault - to generate a BIT error on the user-selected channel stat - to display all latched statuses clear - to clear all latched status registers