Fixed many compiler warning messages
This commit is contained in:
@@ -69,8 +69,9 @@ static char *sccsID = "@(#)drvComet.c 1.11\t9/16/92";
|
||||
*
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iv.h>
|
||||
#include <types.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
@@ -83,7 +84,6 @@ static char *sccsID = "@(#)drvComet.c 1.11\t9/16/92";
|
||||
#define COMET_NCHAN 4
|
||||
#define COMET_CHANNEL_MEM_SIZE 0x20000 /* bytes */
|
||||
#define COMET_DATA_MEM_SIZE (COMET_CHANNEL_MEM_SIZE*COMET_NCHAN)
|
||||
static char *shortaddr;
|
||||
static short scan_control; /* scan type/rate (if >0 normal, <=0 external control) */
|
||||
|
||||
/* comet conrtol register map */
|
||||
@@ -185,7 +185,6 @@ cometDoneTask()
|
||||
{
|
||||
register unsigned card;
|
||||
register struct comet_config *pconfig;
|
||||
register long i;
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
@@ -287,7 +286,7 @@ cometDoneTask()
|
||||
* intialize the driver for the COMET digitizer from omnibyte
|
||||
*
|
||||
*/
|
||||
comet_init()
|
||||
int comet_init()
|
||||
{
|
||||
register struct comet_config *pconfig;
|
||||
short readback,got_one,card;
|
||||
@@ -308,18 +307,18 @@ comet_init()
|
||||
if (pcomet_config == 0)
|
||||
{
|
||||
logMsg("\nCOMET: Couldn't allocate memory for the configuration data");
|
||||
return;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* get the standard and short address locations */
|
||||
if ((status = sysBusToLocalAdrs(VME_AM_SUP_SHORT_IO,wf_addrs[COMET],&pcomet_cr)) != OK){
|
||||
logMsg("\nCOMET: failed to map VME A16 base address\n");
|
||||
return;
|
||||
return(0);
|
||||
}
|
||||
if ((status = sysBusToLocalAdrs(VME_AM_EXT_SUP_DATA,wf_memaddrs[COMET],&extaddr)) != OK){
|
||||
logMsg("\nCOMET: failed to map VME A32 base address\n");
|
||||
return;
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* determine which cards are present */
|
||||
@@ -376,6 +375,7 @@ comet_init()
|
||||
cometDoneTaskId = taskSpawn("cometWFTask",WFDONE_PRI,WFDONE_OPT,WFDONE_STACK,(FUNCPTR) cometDoneTask);
|
||||
taskwdInsert(cometDoneTaskId,NULL,NULL);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ static long init()
|
||||
* initiate waveform read
|
||||
*
|
||||
*/
|
||||
comet_driver(card, signal, pcbroutine, parg, nelements)
|
||||
int comet_driver(card, signal, pcbroutine, parg, nelements)
|
||||
register short card;
|
||||
register unsigned short signal;
|
||||
unsigned int *pcbroutine;
|
||||
@@ -409,8 +409,6 @@ unsigned long nelements;
|
||||
{
|
||||
register struct comet_cr *pcomet_csr;
|
||||
register struct comet_config *pconfig;
|
||||
register unsigned short *pcomet_data;
|
||||
register char *dummy;
|
||||
|
||||
/* printf("comet_driver: BEGIN...\n"); */
|
||||
/* printf("comet_driver: nelements: %d ...\n",nelements); */
|
||||
@@ -485,7 +483,7 @@ unsigned long nelements;
|
||||
*
|
||||
* print status for all cards in the specified COMET address range
|
||||
*/
|
||||
comet_io_report(level)
|
||||
int comet_io_report(level)
|
||||
short int level;
|
||||
{
|
||||
struct comet_config *pconfig;
|
||||
@@ -566,12 +564,11 @@ unsigned n;
|
||||
* controls and reports operating mode
|
||||
*
|
||||
*/
|
||||
comet_mode(card,mode,arg,val)
|
||||
int comet_mode(card,mode,arg,val)
|
||||
short card;
|
||||
unsigned short mode, arg, val;
|
||||
{
|
||||
unsigned char *cptr;
|
||||
int i;
|
||||
|
||||
if (card >= wf_num_cards[COMET])
|
||||
return ERROR;
|
||||
@@ -614,7 +611,7 @@ unsigned short mode, arg, val;
|
||||
}
|
||||
|
||||
/*********************************************/
|
||||
cometGetioscanpvt(card,scanpvt)
|
||||
int cometGetioscanpvt(card,scanpvt)
|
||||
short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
{
|
||||
|
||||
@@ -56,9 +56,13 @@
|
||||
* .17 04-09-96 ric Added SM_FIND_LIMIT, SM_FIND_HOME
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <vme.h>
|
||||
#include <sysLib.h>
|
||||
#include <semLib.h> /* library for semaphore support */
|
||||
#include <intLib.h> /* library for semaphore support */
|
||||
#include <vxLib.h> /* library for semaphore support */
|
||||
#include <rebootLib.h> /* library for semaphore support */
|
||||
#include <wdLib.h>
|
||||
#include <rngLib.h> /* library for ring buffer support */
|
||||
|
||||
@@ -388,10 +392,9 @@ struct motor_data compu_motor_data_array[MAX_COMPU_MOTORS];
|
||||
* is returned to the database library layer every .1 second while a motor
|
||||
* is moving
|
||||
*/
|
||||
compu_resp_task()
|
||||
int compu_resp_task()
|
||||
{
|
||||
unsigned char resp[RESPBUF_SZ];
|
||||
register short i;
|
||||
register struct motor_data *pmotor_data;
|
||||
|
||||
FOREVER {
|
||||
@@ -477,7 +480,7 @@ char compu_pos_reqs[] = { SM_GET_ABS_ENC, SM_GET_Z_REL_POS, SM_GET_MOV_STAT };
|
||||
* task to solicit currnet status from the compumotor 1830 cards while they
|
||||
* are active
|
||||
*/
|
||||
compu_task()
|
||||
int compu_task()
|
||||
{
|
||||
register short inactive_count;
|
||||
register short card;
|
||||
@@ -518,7 +521,7 @@ compu_task()
|
||||
*
|
||||
* interrupt vector for the compumotor 1830 card
|
||||
*/
|
||||
compu_intr(mdnum)
|
||||
int compu_intr(mdnum)
|
||||
register int mdnum;
|
||||
{
|
||||
register struct compumotor *pmtr; /* memory port to motor card */
|
||||
@@ -633,7 +636,7 @@ short trigger = 0;
|
||||
*
|
||||
* driver interface to the database library layer
|
||||
*/
|
||||
compu_driver(card, channel, value_flag,arg1,arg2)
|
||||
int compu_driver(card, channel, value_flag,arg1,arg2)
|
||||
register short card;
|
||||
short channel;
|
||||
short value_flag;
|
||||
@@ -771,7 +774,7 @@ register int arg2;
|
||||
* send a message to the compumotor 1830
|
||||
*/
|
||||
int wait_count;
|
||||
compu_send_msg(pmotor,pmsg,count)
|
||||
int compu_send_msg(pmotor,pmsg,count)
|
||||
register struct compumotor *pmotor;
|
||||
register char *pmsg;
|
||||
register short count;
|
||||
@@ -798,6 +801,7 @@ register short count;
|
||||
pmotor->cm_cb = SND_MORE;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -827,7 +831,6 @@ long compu_sm_io_report(level)
|
||||
VOID compu_sm_stat(compu_num)
|
||||
short int compu_num;
|
||||
{
|
||||
struct motor_data *pmotor_data;
|
||||
printf("\tCW limit = %d\t,CCW limit = %d\tMoving = %d\tDirection = %d\n",
|
||||
compu_motor_data_array[compu_num].cw_limit,
|
||||
compu_motor_data_array[compu_num].ccw_limit,
|
||||
|
||||
+21
-15
@@ -91,6 +91,10 @@
|
||||
static char *sccsId = "@(#)drvFp.c 1.12\t6/4/93";
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "stdlib.h"
|
||||
#include "stdio.h"
|
||||
#include "intLib.h"
|
||||
#include "rebootLib.h"
|
||||
#include "vme.h"
|
||||
#include "taskLib.h"
|
||||
#include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
@@ -115,6 +119,7 @@ struct {
|
||||
static long report()
|
||||
{
|
||||
fp_io_report();
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long init()
|
||||
@@ -198,7 +203,7 @@ static void fp_reboot();
|
||||
* interrupt service routine
|
||||
*
|
||||
*/
|
||||
fp_int(card)
|
||||
int fp_int(card)
|
||||
unsigned card;
|
||||
{
|
||||
register struct fp_rec *ptr = &fp[card];
|
||||
@@ -236,6 +241,7 @@ unsigned card;
|
||||
ptr->int_num++; /* log interrupt */
|
||||
regptr->csr |= CSR_RST; /* clear status and rearm */
|
||||
regptr->csr ^= CSR_RST;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -246,7 +252,7 @@ unsigned card;
|
||||
*
|
||||
*
|
||||
*/
|
||||
fp_init(addr)
|
||||
int fp_init(addr)
|
||||
unsigned int addr;
|
||||
{
|
||||
int i;
|
||||
@@ -356,10 +362,9 @@ void fp_reboot()
|
||||
* (toggles the interrupt enable - joh)
|
||||
*
|
||||
*/
|
||||
fp_en(card)
|
||||
int fp_en(card)
|
||||
short card;
|
||||
{
|
||||
unsigned short temp;
|
||||
|
||||
if (card < 0 || (card > fp_num))
|
||||
return -1;
|
||||
@@ -376,7 +381,7 @@ short card;
|
||||
* set interrupt reporting mode
|
||||
*
|
||||
*/
|
||||
fp_mode(card,mode)
|
||||
int fp_mode(card,mode)
|
||||
short card, mode;
|
||||
{
|
||||
if (card < 0 || (card > fp_num))
|
||||
@@ -390,7 +395,7 @@ fp_mode(card,mode)
|
||||
* read current local inputs and enable switches
|
||||
*
|
||||
*/
|
||||
fp_srd(card,option)
|
||||
int fp_srd(card,option)
|
||||
short card;
|
||||
short option;
|
||||
{
|
||||
@@ -406,7 +411,7 @@ fp_srd(card,option)
|
||||
* read latched local inputs
|
||||
*
|
||||
*/
|
||||
fp_frd(card)
|
||||
int fp_frd(card)
|
||||
short card;
|
||||
{
|
||||
if (card < 0 || (card > fp_num))
|
||||
@@ -419,7 +424,7 @@ fp_frd(card)
|
||||
* read csr contents
|
||||
*
|
||||
*/
|
||||
fp_csrd(card)
|
||||
int fp_csrd(card)
|
||||
short card;
|
||||
{
|
||||
if (card < 0 || (card > fp_num))
|
||||
@@ -432,7 +437,7 @@ fp_csrd(card)
|
||||
* epics interface to fast protect
|
||||
*
|
||||
*/
|
||||
fp_driver(card,mask,prval)
|
||||
int fp_driver(card,mask,prval)
|
||||
register unsigned short card;
|
||||
unsigned int mask;
|
||||
register unsigned int *prval;
|
||||
@@ -451,7 +456,7 @@ fp_driver(card,mask,prval)
|
||||
* command line interface to fp_driver
|
||||
*
|
||||
*/
|
||||
fp_read(card)
|
||||
int fp_read(card)
|
||||
short card;
|
||||
{
|
||||
unsigned int fpval,ret;
|
||||
@@ -470,7 +475,7 @@ fp_read(card)
|
||||
* dump fast protect status to console
|
||||
*
|
||||
*/
|
||||
fp_dump()
|
||||
int fp_dump()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -487,11 +492,11 @@ fp_dump()
|
||||
* monitor fast protect cards and report failures to console
|
||||
*
|
||||
*/
|
||||
fp_mon()
|
||||
void fp_mon()
|
||||
{
|
||||
for(semTake(fp_semid,WAIT_FOREVER);fp_dump() != 0;semTake(fp_semid,WAIT_FOREVER));
|
||||
}
|
||||
fp_monitor()
|
||||
int fp_monitor()
|
||||
{
|
||||
static char *name = "fpmon";
|
||||
int tid;
|
||||
@@ -506,7 +511,7 @@ fp_monitor()
|
||||
return 0;
|
||||
}
|
||||
|
||||
fp_io_report(level)
|
||||
int fp_io_report(level)
|
||||
int level;
|
||||
{
|
||||
int i;
|
||||
@@ -514,9 +519,10 @@ int level;
|
||||
for(i=0; i<=fp_num; i++){
|
||||
printf("BI: AT8-FP-S: card %d\n", i);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
fp_getioscanpvt(card,scanpvt)
|
||||
int fp_getioscanpvt(card,scanpvt)
|
||||
short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
{
|
||||
|
||||
@@ -83,8 +83,13 @@
|
||||
|
||||
static char *sccsId = "@(#)drvFpm.c 1.12\t8/4/93";
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "vme.h"
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <rebootLib.h>
|
||||
#include <intLib.h>
|
||||
#include <vxLib.h>
|
||||
#include <vme.h>
|
||||
#include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
#include "module_types.h"
|
||||
#include <dbDefs.h>
|
||||
@@ -104,6 +109,7 @@ struct {
|
||||
static long report()
|
||||
{
|
||||
fpm_io_report();
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long init()
|
||||
@@ -173,7 +179,7 @@ static void fpm_reboot();
|
||||
* interrupt service routine
|
||||
*
|
||||
*/
|
||||
fpm_int(ptr)
|
||||
int fpm_int(ptr)
|
||||
register struct fpm_rec *ptr;
|
||||
{
|
||||
register struct fp10m *regptr;
|
||||
@@ -190,6 +196,7 @@ fpm_int(ptr)
|
||||
break;
|
||||
}
|
||||
ptr->int_num++;
|
||||
return(0);
|
||||
}
|
||||
/*
|
||||
* fpm_init
|
||||
@@ -197,7 +204,7 @@ fpm_int(ptr)
|
||||
* initialization for fp10m fast protect master modules
|
||||
*
|
||||
*/
|
||||
fpm_init(addr)
|
||||
int fpm_init(addr)
|
||||
unsigned int addr;
|
||||
{
|
||||
int i;
|
||||
@@ -290,7 +297,7 @@ void fpm_reboot()
|
||||
* (toggles the int enable state - joh)
|
||||
*
|
||||
*/
|
||||
fpm_en(card)
|
||||
int fpm_en(card)
|
||||
short card;
|
||||
{
|
||||
if (card < 0 || (card > fpm_num))
|
||||
@@ -308,7 +315,7 @@ fpm_en(card)
|
||||
* set interrupt reporting mode
|
||||
*
|
||||
*/
|
||||
fpm_mode(card,mode)
|
||||
int fpm_mode(card,mode)
|
||||
short card, mode;
|
||||
{
|
||||
if (card < 0 || (card > fpm_num))
|
||||
@@ -322,7 +329,7 @@ fpm_mode(card,mode)
|
||||
* carrier disable (1), enable (0)
|
||||
*
|
||||
*/
|
||||
fpm_cdis(card,disable)
|
||||
int fpm_cdis(card,disable)
|
||||
short card, disable;
|
||||
{
|
||||
unsigned short temp;
|
||||
@@ -341,7 +348,7 @@ fpm_cdis(card,disable)
|
||||
* set failure mode
|
||||
*
|
||||
*/
|
||||
fpm_fail(card,mode)
|
||||
int fpm_fail(card,mode)
|
||||
short card, mode;
|
||||
{
|
||||
unsigned short temp;
|
||||
@@ -360,7 +367,7 @@ fpm_fail(card,mode)
|
||||
* read status bits
|
||||
*
|
||||
*/
|
||||
fpm_srd(card)
|
||||
int fpm_srd(card)
|
||||
short card;
|
||||
{
|
||||
if (card < 0 || ( card > fpm_num))
|
||||
@@ -373,7 +380,7 @@ fpm_srd(card)
|
||||
* epics interface to fast protect master
|
||||
*
|
||||
*/
|
||||
fpm_driver(card,mask,prval)
|
||||
int fpm_driver(card,mask,prval)
|
||||
register unsigned short card;
|
||||
unsigned int mask;
|
||||
register unsigned int prval;
|
||||
@@ -392,7 +399,7 @@ register unsigned int prval;
|
||||
* command line interface to fpm_driver
|
||||
*
|
||||
*/
|
||||
fpm_write(card,val)
|
||||
int fpm_write(card,val)
|
||||
short card;
|
||||
unsigned int val;
|
||||
{
|
||||
@@ -404,7 +411,7 @@ fpm_write(card,val)
|
||||
* read the current control register contents (readback)
|
||||
*
|
||||
*/
|
||||
fpm_read(card,mask,pval)
|
||||
int fpm_read(card,mask,pval)
|
||||
register unsigned short card;
|
||||
unsigned int mask;
|
||||
register unsigned int *pval;
|
||||
@@ -421,7 +428,7 @@ register unsigned int *pval;
|
||||
* fpm_io_report()
|
||||
*
|
||||
*/
|
||||
fpm_io_report(level)
|
||||
int fpm_io_report(level)
|
||||
int level;
|
||||
{
|
||||
int i;
|
||||
@@ -429,4 +436,5 @@ int level;
|
||||
for(i=0; i<=fpm_num; i++){
|
||||
printf("BO: AT8-FP-M: card %d\n", i);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -72,11 +72,10 @@ static char *sccsID = "@(#)drvJgvtr1.c 1.17\t9/9/93";
|
||||
/* drvJgvtr1.c - Driver Support Routines for Jgvtr1 */
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <vme.h>
|
||||
#include <iv.h>
|
||||
#include <sysLib.h>
|
||||
#include <stdioLib.h>
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <module_types.h>
|
||||
|
||||
module_types()
|
||||
int module_types()
|
||||
{
|
||||
|
||||
ai_num_cards[AB1771IL] = 12;
|
||||
|
||||
Reference in New Issue
Block a user