/* ************************************************************** */ /* * Module TMAGPARAM * This module contains functions to assist in parameter handling * for the TMAG module. * * Zachary Wolf * 11/16/00 */ /* ************************************************************** */ /* INCLUDES */ #include #include "tmag.h" /* ************************************************************** */ /* PUBLIC FUNCTIONS */ /* ************************************************************** */ /* * tmagparam_fill_param_struct * This function fills the parameter structure using # defined * parameters. * * Zachary Wolf * 11/16/00 */ void tmagparam_fill_param_struct(struct tmag_param_struct* tmag_param) { /* Declare variables */ int i; /* Include parameter definitions */ #include "param.h" /* Set the TMAG parameters */ tmag_param->board_addr = TMAG_BOARD_ADDR; tmag_param->hp3457_addr = TMAG_HP3457_ADDR; tmag_param->k7011_addr = TMAG_K7011_ADDR; tmag_param->device_type = TMAG_DEVICE_TYPE; tmag_param->k7011_card_num = TMAG_K7011_CARD_NUM; tmag_param->k7011_hp3457_chan = TMAG_K7011_HP3457_CHAN; tmag_param->show_ui = TMAG_SHOW_UI; if (TMAG_NUM_TMAG_PROBES <= TMAG_MAX_NUM_PROBES) { tmag_param->num_tmag_probes = TMAG_NUM_TMAG_PROBES; } else { printf("\nError: Too many tmag probes requested!\n"); printf("No measurements will be made.\n"); tmag_param->num_tmag_probes = 0; } for (i = 0; i < tmag_param->num_tmag_probes; i++) { tmag_param->probe[i].chan_num = TMAG_PROBE_CHAN_NUM[i]; strcpy(tmag_param->probe[i].name, TMAG_PROBE_NAME[i]); } /* Done */ return; }