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

Enumerations

enum  ttl_basic_interrupt_commands { TTL_BASIC_INTERRUPT_CMD_CONFIGURE , TTL_BASIC_INTERRUPT_CMD_STATUS_READ , TTL_BASIC_INTERRUPT_CMD_STATUS_CLEAR , TTL_BASIC_INTERRUPT_CMD_COUNT }
 

Functions

static int32_t Run_TTL_BasicInterrupt (int32_t cardIndex, int32_t module, uint32_t modid)
 Run_TTL_BasicInterrupt prompts the user for the card, module and channel to use for the application and calls Cfg_TTL_Channel if the card, module, channel is valid for as a ttl module.
 
static void Cfg_TTL_Channel (int32_t cardIndex, int32_t module, int32_t MaxChannel)
 Cfg_TTL_Channel handles calling the Display_TTL_ChannelCfg routine to display the ttl channel configuration and calling the routines associated with the user's menu commands.
 
static void Verify_TTL_ParamCnt (int32_t paramCnt)
 Verify_TTL_ParamCnt verifies parameter count and displays error message if invalid.
 
static nai_status_t Display_TTL_Status (int32_t paramCnt, int32_t *p_params)
 Display_TTL_Status illustrate the methods to call in the naibrd library to retrieve the status states.
 
static nai_status_t Clear_TTL_Status (int32_t paramCnt, int32_t *p_params)
 
static nai_status_t Configure_TTL_Interrupt (int32_t paramCnt, int32_t *p_params)
 
static void SampleCallBack (uint32_t vector)
 
int32_t TTL_BasicInterrupt (void)
 The purpose of the TTL_BasicInterrupt is to illustrate the methods to call in the naibrd library to perform basic operations with the ttl modules for configuration setup, controlling the drive outputs, and reading the channels.
 

Variables

static const int8_t * DEF_CONFIG_FILE = (const int8_t *)"default_TTL_BasicInterrupt.txt"
 
static const int32_t DEF_TTL_CARD_INDEX = 0
 
static const int32_t DEF_TTL_MODULE = 1
 
static const int32_t DEF_TTL_CHANNEL = 1
 
static naiapp_cmdtbl_params_t TTL_BasicInterruptMenuCmds []
 

Enumeration Type Documentation

◆ ttl_basic_interrupt_commands

Enumerator
TTL_BASIC_INTERRUPT_CMD_CONFIGURE 
TTL_BASIC_INTERRUPT_CMD_STATUS_READ 
TTL_BASIC_INTERRUPT_CMD_STATUS_CLEAR 
TTL_BASIC_INTERRUPT_CMD_COUNT 

Function Documentation

◆ Cfg_TTL_Channel()

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

Cfg_TTL_Channel handles calling the Display_TTL_ChannelCfg routine to display the ttl channel configuration and calling the routines associated with the user's menu commands.

◆ Clear_TTL_Status()

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

◆ Configure_TTL_Interrupt()

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

◆ Display_TTL_Status()

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

Display_TTL_Status illustrate the methods to call in the naibrd library to retrieve the status states.

◆ Run_TTL_BasicInterrupt()

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

Run_TTL_BasicInterrupt prompts the user for the card, module and channel to use for the application and calls Cfg_TTL_Channel if the card, module, channel is valid for as a ttl module.

◆ SampleCallBack()

static void SampleCallBack ( uint32_t vector)
static

◆ TTL_BasicInterrupt()

int32_t TTL_BasicInterrupt ( void )

The purpose of the TTL_BasicInterrupt is to illustrate the methods to call in the naibrd library to perform basic operations with the ttl modules for configuration setup, controlling the drive outputs, and reading the channels.

The following system configuration routines from the nai_sys_cfg.c file are called to assist with the configuration setup for this program prior to calling the naibrd TTL routines.

  • ClearDeviceCfg
  • QuerySystemCfg
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • SaveDeviceCfg

◆ Verify_TTL_ParamCnt()

static void Verify_TTL_ParamCnt ( int32_t paramCnt)
static

Verify_TTL_ParamCnt verifies parameter count and displays error message if invalid.

Variable Documentation

◆ DEF_CONFIG_FILE

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

◆ DEF_TTL_CARD_INDEX

const int32_t DEF_TTL_CARD_INDEX = 0
static

◆ DEF_TTL_CHANNEL

const int32_t DEF_TTL_CHANNEL = 1
static

◆ DEF_TTL_MODULE

const int32_t DEF_TTL_MODULE = 1
static

◆ TTL_BasicInterruptMenuCmds

naiapp_cmdtbl_params_t TTL_BasicInterruptMenuCmds[]
static
Initial value:
= {
{"INT", "TTL Configure Interrupt", TTL_BASIC_INTERRUPT_CMD_CONFIGURE, Configure_TTL_Interrupt},
{"STAT", "TTL Display Status", TTL_BASIC_INTERRUPT_CMD_STATUS_READ, Display_TTL_Status},
{"CLEAR", "TTL Clear Status", TTL_BASIC_INTERRUPT_CMD_STATUS_CLEAR, Clear_TTL_Status},
}
static nai_status_t Clear_TTL_Status(int32_t paramCnt, int32_t *p_params)
Definition ttl_basic_interrupt.c:276
static nai_status_t Display_TTL_Status(int32_t paramCnt, int32_t *p_params)
Display_TTL_Status illustrate the methods to call in the naibrd library to retrieve the status states...
Definition ttl_basic_interrupt.c:237
@ TTL_BASIC_INTERRUPT_CMD_CONFIGURE
Definition ttl_basic_interrupt.c:42
@ TTL_BASIC_INTERRUPT_CMD_STATUS_CLEAR
Definition ttl_basic_interrupt.c:44
@ TTL_BASIC_INTERRUPT_CMD_STATUS_READ
Definition ttl_basic_interrupt.c:43
static nai_status_t Configure_TTL_Interrupt(int32_t paramCnt, int32_t *p_params)
Definition ttl_basic_interrupt.c:328