Removed V5/V4 and EPICS_V2 conditionals.
This commit is contained in:
@@ -182,6 +182,7 @@
|
||||
* .59 07-27-93 mrk Included changes made by Jeff Hill to stop warning messages
|
||||
* .60 07-27-93 mrk Made changes for vxWorks 5.x semLib
|
||||
* .61 08-02-93 mrk Added call to taskwdInsert
|
||||
* .62 08-04-93 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -463,13 +464,8 @@ short ab_op_stat[AB_MAX_LINKS];
|
||||
before we actually receive it for a given card. Keeps
|
||||
us from asking for data faster than card can supply it */
|
||||
unsigned short ab_btq_cnt[AB_MAX_LINKS][AB_MAX_ADAPTERS][AB_MAX_CARDS];
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
static IOSCANPVT ioscanpvt[AB_MAX_LINKS][AB_MAX_ADAPTERS][AB_MAX_CARDS];
|
||||
#else
|
||||
extern short wakeup_init; /* flags that the database scan initialization is complete */
|
||||
#define interruptAccept wakeup_init
|
||||
#endif
|
||||
|
||||
/*
|
||||
* flags a communication error on a link status
|
||||
@@ -1161,11 +1157,7 @@ ab_bi_cos_simulator()
|
||||
ps_input = (unsigned short *)&(p6008->iit[inpinx]);
|
||||
ps_oldval = (unsigned short *)&(ab_old_binary_ins[inpinx]);
|
||||
if ((*ps_input != *ps_oldval) || first_scan || adapter_status_change){
|
||||
#ifdef EPICS_V2
|
||||
io_event_scanner_wakeup(IO_BI,ABBI_16_BIT,card,link,adapter);
|
||||
#else
|
||||
scanIoRequest(ioscanpvt[link][adapter][card]);
|
||||
#endif
|
||||
*ps_oldval = *ps_input;
|
||||
}
|
||||
}else{
|
||||
@@ -1174,11 +1166,7 @@ ab_bi_cos_simulator()
|
||||
if (inpinx & 0x1) inpinx--; /* shuffle those bytes */
|
||||
else inpinx++;
|
||||
if ((p6008->iit[inpinx] != ab_old_binary_ins[inpinx]) || first_scan || adapter_status_change){
|
||||
#ifdef EPICS_V2
|
||||
io_event_scanner_wakeup(IO_BI,ABBI_08_BIT,card,link,adapter);
|
||||
#else
|
||||
scanIoRequest(ioscanpvt[link][adapter][card]);
|
||||
#endif
|
||||
ab_old_binary_ins[inpinx] = p6008->iit[inpinx];
|
||||
}
|
||||
}
|
||||
@@ -1197,7 +1185,6 @@ ab_bi_cos_simulator()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
int ab_bi_getioscanpvt(link,adapter,card,scanpvt)
|
||||
unsigned short link;
|
||||
unsigned short adapter;
|
||||
@@ -1207,7 +1194,6 @@ IOSCANPVT *scanpvt;
|
||||
*scanpvt = ioscanpvt[link][adapter][card];
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ALLEN-BRADLEY DRIVER INITIALIZATION CODE
|
||||
@@ -1273,14 +1259,12 @@ ab_driver_init()
|
||||
}else{
|
||||
p6008s[link] = 0;
|
||||
}
|
||||
#ifndef EPICS_V2
|
||||
if(p6008s[link]) {
|
||||
int adapter,card;
|
||||
for(adapter=0; adapter<AB_MAX_ADAPTERS; adapter++)
|
||||
for(card=0; card<AB_MAX_CARDS; card++)
|
||||
scanIoInit(&ioscanpvt[link][adapter][card]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (got_one){
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
* .18 joh 082792 converted to ansi C
|
||||
* .19 joh 111392 removed shifts on analog IO
|
||||
* .20 joh 071593 fixwd comment
|
||||
* .21 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
* Notes:
|
||||
* ------
|
||||
@@ -102,20 +103,14 @@
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
#include <types.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
#include <drvSup.h>
|
||||
#include <dbDefs.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
#include <drvEpvxi.h>
|
||||
|
||||
static char SccsId[] = "$Id$\t$Date$";
|
||||
@@ -429,9 +424,7 @@ struct at5vxi_config{
|
||||
char mdt; /* modified data tag */
|
||||
struct vxi_csr *pcsr; /* vxi device hdr ptr */
|
||||
struct at5vxi_dd *pdd; /* at5 device dep ptr */
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT ioscanpvt;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -613,9 +606,7 @@ void at5vxi_init_card(
|
||||
pc->pdd = (struct at5vxi_dd *) &pc->pcsr->dir.r.dd;
|
||||
|
||||
FASTLOCKINIT(&pc->lock);
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(&pc->ioscanpvt);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -720,9 +711,9 @@ void at5vxi_init_card(
|
||||
|
||||
# ifndef CONTINUOUS_OPERATION
|
||||
r0 = intConnect(
|
||||
(unsigned char) INUM_TO_IVEC(addr),
|
||||
INUM_TO_IVEC(addr),
|
||||
at5vxi_int_service,
|
||||
(void *) addr);
|
||||
(int) addr);
|
||||
if(r0 == ERROR)
|
||||
return;
|
||||
|
||||
@@ -781,12 +772,7 @@ void at5vxi_int_service(
|
||||
* wake up the I/O event scanner
|
||||
*/
|
||||
{
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_AI, VXI_AT5_AI, addr);
|
||||
io_scanner_wakeup(IO_BI, VXI_AT5_BI, addr);
|
||||
#else
|
||||
scanIoRequest(pconfig->ioscanpvt);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1442,7 +1428,6 @@ int at5vxi_bo_driver(
|
||||
}
|
||||
|
||||
|
||||
#ifndef EPICS_V2
|
||||
/*
|
||||
*
|
||||
* at5vxi_getioscanpvt()
|
||||
@@ -1459,5 +1444,4 @@ IOSCANPVT *scanpvt;
|
||||
if(pconfig) *scanpvt = pconfig->ioscanpvt;
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
* signal number checking now based on the array element
|
||||
* count.
|
||||
* .13 mrk 080293 Added call to taskwdInsert
|
||||
* .14 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
static char *sccsID = "@(#)drvComet.c 1.11\t9/16/92";
|
||||
@@ -68,11 +69,7 @@ static char *sccsID = "@(#)drvComet.c 1.11\t9/16/92";
|
||||
*
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
# ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
# else
|
||||
# include <iv68k.h>
|
||||
# endif
|
||||
#include <iv.h>
|
||||
#include <types.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
* needed
|
||||
* JRW 01/18/92 Replaced init code to allow user to select the interrupt
|
||||
* level value and to select the ports that are to be read.
|
||||
* MGB 08/04/93 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
*
|
||||
* NOTE (JRW 11-18-92):
|
||||
@@ -123,14 +124,8 @@ static char *SccsId = "$Id$";
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#include <module_types.h>
|
||||
#ifdef V5_vxWorks
|
||||
#include <iv.h>
|
||||
#else
|
||||
#include <iv68k.h>
|
||||
#endif
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
#include <dbScan.h>
|
||||
|
||||
/* general constants */
|
||||
#define DVX_ID 0xCFF5 /* analogic ID code */
|
||||
@@ -208,9 +203,7 @@ struct dvx_rec
|
||||
unsigned int numChan; /* total number of ports to read */
|
||||
unsigned long pgmMask[8]; /* ports to be read by seq-program */
|
||||
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT *pioscanpvt;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* dma chain table size */
|
||||
@@ -276,7 +269,7 @@ struct dvx_rec
|
||||
|
||||
/* If any of the following does not exist replace it with #define <> NULL */
|
||||
long dvx_io_report(int level);
|
||||
long dvx_driver_init(void);
|
||||
static long dvx_driver_init(void);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
@@ -289,24 +282,16 @@ struct {
|
||||
|
||||
static struct dvx_rec dvx[MAX_DVX_CARDS] = {
|
||||
{ NULL, NULL, NULL, -1, -1, -1, -1, -1, 128, 0, {0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff}
|
||||
#ifndef EPICS_V2
|
||||
, NULL
|
||||
#endif
|
||||
},
|
||||
{ NULL, NULL, NULL, -1, -1, -1, -1, -1, 128, 0, {0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff}
|
||||
#ifndef EPICS_V2
|
||||
, NULL
|
||||
#endif
|
||||
},
|
||||
{ NULL, NULL, NULL, -1, -1, -1, -1, -1, 128, 0, {0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff}
|
||||
#ifndef EPICS_V2
|
||||
, NULL
|
||||
#endif
|
||||
},
|
||||
{ NULL, NULL, NULL, -1, -1, -1, -1, -1, 128, 0, {0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff}
|
||||
#ifndef EPICS_V2
|
||||
, NULL
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -315,32 +300,32 @@ static int dvxOnline = 0; /* 1 after init invoked */
|
||||
|
||||
#ifdef __STDC__
|
||||
int lclToA24(void *pLocal, void **ppA24);
|
||||
void dvx_reset(void);
|
||||
void dvx_int(struct dvx_rec *dvxptr);
|
||||
int muxtst(int card);
|
||||
int sramld(int card);
|
||||
int dvx_driver( int card, int chan, short *pval);
|
||||
static void dvx_reset(void);
|
||||
static void dvx_int(struct dvx_rec *dvxptr);
|
||||
static int muxtst(int card);
|
||||
static int sramld(int card);
|
||||
static int dvx_driver( int card, int chan, short *pval);
|
||||
int dvx_dread(int card,int chan);
|
||||
int dvx_dump(int card,int firstchan,int lastchan);
|
||||
int dvx_chan_print(int dvx_card, int firstchan, int lastchan);
|
||||
int dvx_fempty(int card);
|
||||
int dvx_dma_init(struct dvx_rec *ptr);
|
||||
int dvx_dma_reset(struct dvx_rec *ptr);
|
||||
static int dvx_fempty(int card);
|
||||
static int dvx_dma_init(struct dvx_rec *ptr);
|
||||
static int dvx_dma_reset(struct dvx_rec *ptr);
|
||||
int dvx_dma_stat(int card, int chan);
|
||||
#else /* __STDC__ */
|
||||
|
||||
int lclToA24();
|
||||
void dvx_reset();
|
||||
void dvx_int();
|
||||
int muxtst();
|
||||
int sramld();
|
||||
int dvx_driver();
|
||||
static void dvx_reset();
|
||||
static void dvx_int();
|
||||
static int muxtst();
|
||||
static int sramld();
|
||||
static int dvx_driver();
|
||||
int dvx_dread();
|
||||
int dvx_dump();
|
||||
int dvx_chan_print();
|
||||
int dvx_fempty();
|
||||
int dvx_dma_init();
|
||||
int dvx_dma_reset();
|
||||
static int dvx_fempty();
|
||||
static int dvx_dma_init();
|
||||
static int dvx_dma_reset();
|
||||
int dvx_dma_stat();
|
||||
|
||||
|
||||
@@ -399,11 +384,7 @@ dvx_int(struct dvx_rec *dvxptr)
|
||||
cptr->dma_point = DMA_CSR;
|
||||
cptr->dma_data = CMR_SC | M_CIE | M_CH2; /* enable int channel #2 */
|
||||
cptr->dma_data = CMR_START | M_CH2; /* start channel #2 */
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_AI,DVX2502,dvxptr->cnum); /*update database records */
|
||||
#else
|
||||
scanIoRequest(*(dvxptr->pioscanpvt));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
cptr->csr = dvxptr->csr_shadow;
|
||||
@@ -508,10 +489,8 @@ LOCAL long dvx_driver_init(void)
|
||||
}
|
||||
|
||||
|
||||
#ifndef EPICS_V2
|
||||
if ((dvx[i].pioscanpvt = (IOSCANPVT *) malloc(sizeof(IOSCANPVT))) == NULL)
|
||||
return(-1);
|
||||
#endif
|
||||
if (dvx[i].dmaSize == 0)
|
||||
{
|
||||
logMsg("%s: No channels selected on card %d, init aborted\n", i);
|
||||
@@ -601,9 +580,7 @@ LOCAL long dvx_driver_init(void)
|
||||
dvx[i].csr_shadow |= CSR_M_ESTART; /* enable ext start (shadow csr) */
|
||||
pDvxA16->csr = dvx[i].csr_shadow; /* enable external start */
|
||||
dvx[i].mode = RUN_MODE; /* ready to aquire data */
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(dvx[i].pioscanpvt);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0; /* return 0 to database */
|
||||
@@ -977,7 +954,6 @@ int dvx_dump(int card,int firstchan,int lastchan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
dvx_getioscanpvt(int card, IOSCANPVT *scanpvt)
|
||||
{
|
||||
if ((card >= ai_num_cards[DVX2502]) || (card < 0))return(0);
|
||||
@@ -985,7 +961,6 @@ dvx_getioscanpvt(int card, IOSCANPVT *scanpvt)
|
||||
*scanpvt = *(dvx[card].pioscanpvt);
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
* .22 joh 05-24-93 Fixed over-zealous parameter checks in
|
||||
* TTL trigger route
|
||||
* .23 joh 06-03-93 Fixed incorect MXI BP TTL trigger enable
|
||||
* .24 mgb 08-04-93 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
* To do
|
||||
* -----
|
||||
@@ -147,11 +148,7 @@ static char *sccsId = "$Id$\t$Date$";
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <vme.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <memLib.h>
|
||||
|
||||
@@ -1839,11 +1836,7 @@ LOCAL int
|
||||
vxi_self_test(void)
|
||||
{
|
||||
unsigned la;
|
||||
#ifdef V5_vxWorks
|
||||
UINT16 wd;
|
||||
#else
|
||||
unsigned short wd;
|
||||
#endif
|
||||
int status;
|
||||
struct vxi_csr *pcsr;
|
||||
VXIDI **ppvxidi;
|
||||
@@ -2527,11 +2520,7 @@ int epvxiDeviceVerify(unsigned la)
|
||||
int status;
|
||||
VXICSR *pcsr;
|
||||
VXIDI *pvxidi;
|
||||
# ifdef V5_vxWorks
|
||||
UINT16 device_status;
|
||||
# else
|
||||
unsigned short device_status;
|
||||
# endif
|
||||
|
||||
if(la > NELEMENTS(epvxiLibDeviceList)){
|
||||
return VXI_BAD_LA;
|
||||
@@ -3406,7 +3395,6 @@ LOCAL int
|
||||
epvxiSymbolTableInit(void)
|
||||
{
|
||||
|
||||
# ifdef V5_vxWorks
|
||||
epvxiSymbolTable = symTblCreate(
|
||||
EPVXI_MAX_SYMBOLS_LOG2,
|
||||
FALSE,
|
||||
@@ -3414,28 +3402,6 @@ epvxiSymbolTableInit(void)
|
||||
if(!epvxiSymbolTable){
|
||||
return ERROR;
|
||||
}
|
||||
# else
|
||||
{
|
||||
int status;
|
||||
|
||||
epvxiSymbolTable = symTblCreate(
|
||||
EPVXI_MAX_SYMBOLS,
|
||||
EPVXI_MAX_SYMBOL_LENGTH);
|
||||
if(!epvxiSymbolTable){
|
||||
return ERROR;
|
||||
}
|
||||
status = symTblInit(
|
||||
epvxiSymbolTable,
|
||||
EPVXI_MAX_SYMBOLS,
|
||||
EPVXI_MAX_SYMBOL_LENGTH);
|
||||
if(status<0){
|
||||
epvxiSymbolTable = NULL;
|
||||
logMsg("epvxi: cant delete the symbol table under V4- memory lost\n");
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
* .03 joh 060292 Added debug mode
|
||||
* .04 joh 072992 added signal register for the HP1404
|
||||
* .05 joh 082592 added arg to epvxiRead() and epvxiWrite()
|
||||
* .06 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
* Improvements
|
||||
* ------------
|
||||
@@ -50,11 +51,7 @@ static char *sccsId = "$Id$\t$Date$";
|
||||
#include <semLib.h>
|
||||
#include <drvEpvxi.h>
|
||||
#include <fast_lock.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
|
||||
enum msgDeviceSyncType {
|
||||
syncInt,
|
||||
@@ -944,11 +941,7 @@ int vxiMsgOpen(
|
||||
|
||||
vxiMsgSignalSetup();
|
||||
|
||||
# ifdef V5_vxWorks
|
||||
pvximdi->syncSem = semBCreate(SEM_Q_PRIORITY, SEM_EMPTY);
|
||||
# else
|
||||
pvximdi->syncSem = semCreate();
|
||||
# endif
|
||||
if(!pvximdi->syncSem){
|
||||
return VXI_NO_MEMORY;
|
||||
}
|
||||
@@ -1352,17 +1345,12 @@ int vxiMsgSync(
|
||||
pollcnt--;
|
||||
}
|
||||
else{
|
||||
#ifdef V5_vxWorks
|
||||
status = semTake(
|
||||
pvximdi->syncSem,
|
||||
VXIMSGSYNCDELAY);
|
||||
if(status < 0){
|
||||
timeout -= VXIMSGSYNCDELAY;
|
||||
}
|
||||
#else
|
||||
taskDelay(VXIMSGSYNCDELAY);
|
||||
timeout -= VXIMSGSYNCDELAY;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
while(timeout>0);
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
* .13 joh 082792 converted to V5 vxorks
|
||||
* .14 mrk 090192 support epics I/O event scan, and added DRVET
|
||||
* .15 mrk 080293 Add call to taskwdInsert
|
||||
* .16 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
|
||||
@@ -92,19 +93,13 @@ static char *sccsId = "@(#)drvFp.c 1.12\t6/4/93";
|
||||
#include "vxWorks.h"
|
||||
#include "vme.h"
|
||||
#include "taskLib.h"
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
|
||||
#include "module_types.h"
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#include <taskwd.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
|
||||
static long report();
|
||||
static long init();
|
||||
@@ -188,9 +183,7 @@ struct fp_rec
|
||||
short fp_vector; /* interrupt vector */
|
||||
short mode; /* operating mode */
|
||||
unsigned int int_num; /* interrupt number */
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT ioscanpvt;
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct fp_rec *fp; /* fast protect control structure */
|
||||
@@ -237,11 +230,7 @@ unsigned card;
|
||||
/*
|
||||
* wakeup the interrupt driven scanner
|
||||
*/
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_BI, AT8_FP10S_BI, card);
|
||||
#else
|
||||
scanIoRequest(fp[card].ioscanpvt);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
ptr->int_num++; /* log interrupt */
|
||||
@@ -320,18 +309,12 @@ unsigned int addr;
|
||||
/* start up module */
|
||||
fp[i].fptr->csr |= CSR_IEN; /* enable interrupts */
|
||||
fp[i].mode = FP_RUN; /* normal run mode */
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(&fp[i].ioscanpvt);
|
||||
#endif
|
||||
}
|
||||
fp_num = i - 1; /* record max card # */
|
||||
|
||||
/* create the semaphore */
|
||||
#ifndef V5_vxWorks
|
||||
fp_semid = semCreate();
|
||||
#else
|
||||
fp_semid = semBCreate(SEM_Q_PRIORITY, SEM_EMPTY);
|
||||
#endif
|
||||
if ((int)fp_semid == 0) /* abort if can't create semaphore */
|
||||
return(-3);
|
||||
|
||||
@@ -506,11 +489,7 @@ fp_dump()
|
||||
*/
|
||||
fp_mon()
|
||||
{
|
||||
#ifdef V5_vxWorks
|
||||
for(semTake(fp_semid,WAIT_FOREVER);fp_dump() != 0;semTake(fp_semid,WAIT_FOREVER));
|
||||
#else
|
||||
for(semTake(fp_semid);fp_dump() != 0;semTake(fp_semid));
|
||||
#endif
|
||||
}
|
||||
fp_monitor()
|
||||
{
|
||||
@@ -537,7 +516,6 @@ int level;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
fp_getioscanpvt(card,scanpvt)
|
||||
short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
@@ -546,4 +524,3 @@ IOSCANPVT *scanpvt;
|
||||
*scanpvt = fp[card].ioscanpvt;
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
* .10 joh 071092 moved ivec allocation to module_types.h
|
||||
* .11 joh 072792 added soft reboot int disable
|
||||
* .12 mrk 090292 added DRVET
|
||||
* .13 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
*
|
||||
* Routines:
|
||||
@@ -84,12 +85,7 @@ static char *sccsId = "$Id$\t$Date$";
|
||||
|
||||
#include "vxWorks.h"
|
||||
#include "vme.h"
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
|
||||
#include <iv.h> /* in h/68k if this is compiling for a 68xxx */
|
||||
#include "module_types.h"
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
* .01 joh 073092 Added msg device support & interrupt shutdown for
|
||||
* soft reboots
|
||||
* .02 joh 082792 converted to ANSI C
|
||||
* .03 mgb 080493 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
*
|
||||
*
|
||||
@@ -42,11 +43,7 @@
|
||||
static char *sccsId = "@(#)drvHp1404a.c 1.4\t8/27/92";
|
||||
|
||||
#include <vxWorks.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
#include <drvEpvxi.h>
|
||||
|
||||
LOCAL unsigned long hpE1404DriverID;
|
||||
|
||||
@@ -35,17 +35,14 @@
|
||||
* .01 071792 joh Added model name registration
|
||||
* .02 081992 joh vxiUniqueDriverID -> epvxiUniqueDriverID
|
||||
* .03 082692 mrk Added support for new I/O event scanning and DRVET
|
||||
* .04 080493 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
*/
|
||||
|
||||
static char *sccsId = "$Id$\t$Date$";
|
||||
|
||||
#include <vxWorks.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
#include <types.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
@@ -53,9 +50,7 @@ static char *sccsId = "$Id$\t$Date$";
|
||||
#include <drvEpvxi.h>
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
|
||||
static long init();
|
||||
|
||||
@@ -90,9 +85,7 @@ struct hpe1368a_config{
|
||||
unsigned short pending; /* switch position pending int */
|
||||
unsigned short shadow; /* shadow of actual switch pos */
|
||||
int busy; /* relays active */
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT ioscanpvt;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define HPE1368A_INT_LEVEL 1
|
||||
@@ -181,9 +174,7 @@ unsigned la;
|
||||
ChannelEnable(pcsr) = ALL_SWITCHES_OPEN;
|
||||
|
||||
FASTLOCKINIT(&pc->lock);
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(&pc->ioscanpvt);
|
||||
#endif
|
||||
|
||||
r0 = intConnect(
|
||||
INUM_TO_IVEC(la),
|
||||
@@ -241,11 +232,7 @@ unsigned la;
|
||||
/*
|
||||
* tell them that the switches have settled
|
||||
*/
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_BI, HPE1368A_BI, la);
|
||||
#else
|
||||
scanIoRequest(pc->ioscanpvt);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -281,7 +268,6 @@ int level;
|
||||
|
||||
|
||||
|
||||
#ifndef EPICS_V2
|
||||
hpe1368a_getioscanpvt(la,scanpvt)
|
||||
unsigned short la;
|
||||
IOSCANPVT *scanpvt;
|
||||
@@ -292,7 +278,6 @@ IOSCANPVT *scanpvt;
|
||||
if(pc != NULL) *scanpvt = pc->ioscanpvt;
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
* report by bg
|
||||
* 082792 joh added ANSI C function prototypes
|
||||
* 080293 mrk added call to taskwdInsert
|
||||
* 080493 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
static char *sccsID = "@(#)drvJgvtr1.c 1.9\t8/27/92";
|
||||
@@ -81,11 +82,7 @@ static char *sccsID = "@(#)drvJgvtr1.c 1.9\t8/27/92";
|
||||
#include <types.h>
|
||||
#include <vme.h>
|
||||
|
||||
# ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
# else
|
||||
# include <iv68k.h>
|
||||
# endif
|
||||
#include <iv.h>
|
||||
|
||||
|
||||
static long jgvtr1_io_report(
|
||||
|
||||
@@ -34,27 +34,22 @@
|
||||
* .01 071792 joh Added model name registration
|
||||
* .02 081992 joh vxiUniqueDriverID -> epvxiUniqueDriverID
|
||||
* .03 082692 mrk Added support for new I/O event scanning and DRVET
|
||||
* .03 012893 joh include file name change
|
||||
* .04 012893 joh include file name change
|
||||
* .05 080493 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <dbDefs.h>
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
#include <types.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
#include <drvEpvxi.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
|
||||
static long init();
|
||||
|
||||
@@ -88,9 +83,7 @@ epvxiPConfig((LA), KscV215DriverId, struct KscV215_config *)
|
||||
|
||||
struct KscV215_config{
|
||||
FAST_LOCK lock; /* mutual exclusion */
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT ioscanpvt;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define KSCV215_INT_LEVEL 1
|
||||
@@ -245,9 +238,7 @@ unsigned la;
|
||||
}
|
||||
|
||||
FASTLOCKINIT(&pc->lock);
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(&pc->ioscanpvt);
|
||||
#endif
|
||||
|
||||
#ifdef INTERRUPTS
|
||||
status = intConnect(
|
||||
@@ -336,11 +327,7 @@ unsigned la;
|
||||
/*
|
||||
* tell them that the switches have settled
|
||||
*/
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_AI, KSCV215_BI, la);
|
||||
#else
|
||||
scanIoRequest(pc->ioscanpvt);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -456,7 +443,6 @@ register unsigned short *prval;
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
KscV215_getioscanpvt(la,scanpvt)
|
||||
unsigned short la;
|
||||
IOSCANPVT *scanpvt;
|
||||
@@ -467,4 +453,3 @@ IOSCANPVT *scanpvt;
|
||||
if(pc != NULL) *scanpvt = pc->ioscanpvt;
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
* bg 06-25-92 combined drvMz8310.c and mz8310_driver.c
|
||||
* bg 06-26-92 Added level to mz8310_io_report.
|
||||
* joh 08-05-92 callable interface now conforms with epics standard
|
||||
* mgb 08-04-93 Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
/* drvMz8310.c - Driver Support Routines for Mz8310 */
|
||||
@@ -59,11 +60,7 @@
|
||||
#include <module_types.h>
|
||||
#include <fast_lock.h>
|
||||
|
||||
#ifdef V5_vxWorks
|
||||
# include <iv.h>
|
||||
#else
|
||||
# include <iv68k.h>
|
||||
#endif
|
||||
#include <iv.h>
|
||||
|
||||
|
||||
/* If any of the following does not exist replace it with #define <> NULL */
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
* .14 09-17-92 joh io report now tabs over detailed info
|
||||
* .15 09-18-92 joh documentation
|
||||
* .16 08-02-93 mrk Added call to taskwdInsert
|
||||
* .17 08-04-93 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
#include "vxWorks.h"
|
||||
@@ -59,15 +60,9 @@
|
||||
#include "module_types.h"
|
||||
#include "task_params.h"
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbDefs.h>
|
||||
#include <dbScan.h>
|
||||
#include <taskwd.h>
|
||||
#else
|
||||
extern short wakeup_init; /* flags that the database scan initialization i
|
||||
s complete */
|
||||
#define interruptAccept wakeup_init
|
||||
#endif
|
||||
|
||||
#define XY240_ADDR0 (bi_addrs[XY240_BI])
|
||||
#define XY240_MAX_CARDS (bi_num_cards[XY240_BI])
|
||||
@@ -97,9 +92,7 @@ struct dio_rec
|
||||
short mode; /*operating mode*/
|
||||
unsigned short sport0_1; /*saved inputs*/
|
||||
unsigned short sport2_3; /*saved inputs*/
|
||||
#ifndef EPICS_V2
|
||||
IOSCANPVT ioscanpvt;
|
||||
#endif
|
||||
/*short dio_vec;*/ /*interrupt vector*/
|
||||
/*unsigned int intr_num;*/ /*interrupt count*/
|
||||
};
|
||||
@@ -178,11 +171,7 @@ dio_scan()
|
||||
|| first_scan)
|
||||
{
|
||||
/* printf("io_scanner_wakeup for card no %d\n",i); */
|
||||
#ifdef EPICS_V2
|
||||
io_scanner_wakeup(IO_BI,XY240_BI,i);
|
||||
#else
|
||||
scanIoRequest(dio[i].ioscanpvt);
|
||||
#endif
|
||||
dio[i].sport0_1 = dio[i].dptr->port0_1;
|
||||
dio[i].sport2_3 = dio[i].dptr->port2_3;
|
||||
}
|
||||
@@ -241,9 +230,7 @@ xy240_init()
|
||||
dio[i].sport2_3 = pdio_xy240->port2_3; /*read and save high values*/
|
||||
dio[i].dptr = pdio_xy240;
|
||||
at_least_one_present = TRUE;
|
||||
#ifndef EPICS_V2
|
||||
scanIoInit(&dio[i].ioscanpvt);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (at_least_one_present)
|
||||
@@ -271,7 +258,6 @@ xy240_init()
|
||||
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
xy240_getioscanpvt(card,scanpvt)
|
||||
short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
@@ -280,7 +266,6 @@ IOSCANPVT *scanpvt;
|
||||
*scanpvt = dio[card].ioscanpvt;
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -78,14 +78,13 @@
|
||||
* status
|
||||
* .22 08-27-92 joh fixed nonexsistant EPICS init
|
||||
* .23 08-02-93 mrk Added call to taskwdInsert
|
||||
* .24 08-04-93 mgb Removed V5/V4 and EPICS_V2 conditionals
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <vme.h>
|
||||
#include <dbDefs.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
#include <dbScan.h>
|
||||
#include <drvSup.h>
|
||||
#include <module_types.h>
|
||||
#include <task_params.h>
|
||||
@@ -191,9 +190,7 @@ struct ai566 **pai_xy566dil;
|
||||
unsigned short **pai_xy566se_mem;
|
||||
unsigned short **pai_xy566di_mem;
|
||||
unsigned short **pai_xy566dil_mem;
|
||||
#ifndef EPICS_V2
|
||||
static IOSCANPVT *paioscanpvt;
|
||||
#endif
|
||||
|
||||
|
||||
/* reset the counter interrupt 0x8000 */
|
||||
@@ -292,12 +289,7 @@ short i;
|
||||
|
||||
ap = pai_xy566dil[i];
|
||||
|
||||
# ifdef EPICS_V2
|
||||
/* wake up the I/O event scanner */
|
||||
io_scanner_wakeup(IO_AI,XY566DIL,ap->card_number);
|
||||
# else
|
||||
scanIoRequest(paioscanpvt[i]);
|
||||
# endif
|
||||
scanIoRequest(paioscanpvt[i]);
|
||||
|
||||
/* reset the CSR - needed to allow next interrupt */
|
||||
senw(&ap->a566_csr,XY566L_CSR);
|
||||
@@ -494,7 +486,6 @@ register short ***pppmem_present;
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
paioscanpvt = (IOSCANPVT *)calloc(num_cards, sizeof(*paioscanpvt));
|
||||
if(!paioscanpvt) {
|
||||
return ERROR;
|
||||
@@ -506,7 +497,6 @@ register short ***pppmem_present;
|
||||
scanIoInit(&paioscanpvt[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
*pppmem_present = (short **)
|
||||
calloc(num_cards, sizeof(**pppmem_present));
|
||||
@@ -630,7 +620,6 @@ register short ***pppmem_present;
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
ai_xy566_getioscanpvt(card,scanpvt)
|
||||
unsigned short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
@@ -638,7 +627,6 @@ IOSCANPVT *scanpvt;
|
||||
if((card<=(unsigned short)MAX_DIL_CARDS) && paioscanpvt[card]) *scanpvt = paioscanpvt[card];
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
ai_xy566_driver(card,chan,type,prval)
|
||||
register short card;
|
||||
|
||||
Reference in New Issue
Block a user