/* ************************************************************** */ /* * Module VSCANPARAM * This module contains functions to assist in parameter handling * for the VSCAN module. * * Zachary Wolf * 10/23/02 */ /* ************************************************************** */ /* INCLUDES */ #include #include #include "vscan.h" /* ************************************************************** */ /* PUBLIC FUNCTIONS */ /* ************************************************************** */ /* * vscanparam_fill_param_struct * This function fills the parameter structure using # defined * parameters. * * Zachary Wolf * 10/23/02 */ void vscanparam_fill_param_struct(struct vscan_param_struct* vscan_param) { /* Declare variables */ int i; /* Include parameter definitions */ #include "param.h" /* Set the VSCAN parameters */ vscan_param->board_addr = VSCAN_BOARD_ADDR; vscan_param->num_dvm = VSCAN_NUM_DVM; /* Check */ if (VSCAN_NUM_DVM > VSCAN_MAX_NUM_DVM) { /* Notify the operator of the error */ printf("\nVSCAN ERROR: Too many DVMs, exiting...\n"); Beep(); Delay(.5); Beep(); Delay(2.); /* Terminate the program */ exit(0); } /* Continue setting the VSCAN parameters */ for (i = 0; i < VSCAN_NUM_DVM; i++) { vscan_param->dvm_info[i] = DVM_INFO[i]; } vscan_param->dist_btwn_trig_pulse = VSCAN_DIST_BTWN_TRIG_PULSE; vscan_param->config = VSCAN_CONFIG; vscan_param->show_ui = VSCAN_SHOW_UI; /* Done */ return; }