From b7752984c7509bb7da962d295d670dc38644fb30 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Mon, 14 Sep 1992 14:03:13 +0000 Subject: [PATCH] Changes for compatibility with epics --- src/drv/drvAt5Vxi.c | 3 +-- src/drv/drvBb902.c | 1 + src/drv/drvFp.c | 54 ++++++++++++++++++++++++++++++++++++++++--- src/drv/drvFpm.c | 29 +++++++++++++++++++++-- src/drv/drvHpe1368a.c | 24 ++++++++++++++++++- src/drv/drvKscV215.c | 24 +++++++++++++++++-- src/drv/drvXy220.c | 1 + src/drv/drvXy240.c | 2 +- src/drv/drvXy566.c | 7 +++--- 9 files changed, 130 insertions(+), 15 deletions(-) diff --git a/src/drv/drvAt5Vxi.c b/src/drv/drvAt5Vxi.c index 33066d5d9..077a37efa 100644 --- a/src/drv/drvAt5Vxi.c +++ b/src/drv/drvAt5Vxi.c @@ -115,14 +115,13 @@ #include #include #include +#include #ifndef EPICS_V2 #include #endif static char SccsId[] = "$Id$\t$Date$"; -typedef long (*DRVSUPFUN) (); /* ptr to driver support function*/ - void log_at5vxi_failure(); void at5vxi_int_service(); diff --git a/src/drv/drvBb902.c b/src/drv/drvBb902.c index 551fb5c33..8705afd54 100644 --- a/src/drv/drvBb902.c +++ b/src/drv/drvBb902.c @@ -183,6 +183,7 @@ register unsigned int *pval; /* readback */ *pval = (pbo_bb902s[card]->high_value << 16) /* high */ + pbo_bb902s[card]->low_value; /* low */ + return(0); } #define masks(K) ((1< +#include +#ifndef EPICS_V2 +#include +#endif + +long report(); +long init(); +struct { + long number; + DRVSUPFUN report; + DRVSUPFUN init; +} drvFp={ + 2, + report, + init}; +static long report() +{ + fp_io_report(); +} + +static long init() +{ + fp_init(0); + return(0); +} + /* general constants */ #define FP_INTLEV 5 /* interrupt level */ #define FP_BUFSIZ 8 /* input buffer size */ @@ -158,6 +185,9 @@ struct fp_rec short fp_vector; /* interrupt vector */ short mode; /* operating mode */ unsigned int int_num; /* interrupt number */ +#ifndef EPICS_V2 + IOSCANPVT ioscanpvt; +#endif }; LOCAL @@ -207,7 +237,11 @@ 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 */ @@ -293,6 +327,9 @@ fp_init(addr) */ 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 # */ if (!(fp_semid = semCreate())) /* abort if can't create semaphore */ @@ -493,3 +530,14 @@ int level; printf("BI: AT8-FP-S: card %d\n", i); } } + +#ifndef EPICS_V2 +fp_getioscanpvt(card,scanpvt) +unsigned short card; +IOSCANPVT *scanpvt; +{ + if ((card >= bi_num_cards[AT8_FP10S_BI])) return(0); + *scanpvt = fp[card].ioscanpvt; + return(0); +} +#endif diff --git a/src/drv/drvFpm.c b/src/drv/drvFpm.c index 2acc45840..d634f8d82 100644 --- a/src/drv/drvFpm.c +++ b/src/drv/drvFpm.c @@ -1,6 +1,7 @@ +/* drvFpm.c */ +/* share/src/drv $Id$ */ + /* - * fpm.c - * * control routines for use with the FP10M fast protect master modules * * routines which are used to test and interface with the @@ -50,6 +51,7 @@ * recompilation * .10 joh 071092 moved ivec allocation to module_types.h * .11 joh 072792 added soft reboot int disable + * .12 mrk 090292 added DRVET * * * Routines: @@ -89,8 +91,31 @@ static char *sccsId = "$Id$\t$Date$"; #endif #include "module_types.h" +#include +#include + +long report(); +long init(); +struct { + long number; + DRVSUPFUN report; + DRVSUPFUN init; +} drvFpm={ + 2, + report, + init}; +static long report() +{ + fpm_io_report(); +} +static long init() +{ + fpm_init(0); + return(0); +} + /* general constants */ #define FPM_INTLEV 5 /* interrupt level */ diff --git a/src/drv/drvHpe1368a.c b/src/drv/drvHpe1368a.c index 01da62888..aedb873bb 100644 --- a/src/drv/drvHpe1368a.c +++ b/src/drv/drvHpe1368a.c @@ -1,3 +1,6 @@ +/* drvHpe1368a.c*/ +/* share/src/drv @(#) $Id$ */ + /* * hpe1368a_driver.c * @@ -31,7 +34,7 @@ * ----------------- * .01 071792 joh Added model name registration * .02 081992 joh vxiUniqueDriverID -> epvxiUniqueDriverID - * .03 082692 mrk Added support for new I/O event scanning + * .03 082692 mrk Added support for new I/O event scanning and DRVET * */ @@ -48,11 +51,30 @@ #include #include #include +#include +#include #ifndef EPICS_V2 #include #endif + +long init(); + +struct { + long number; + DRVSUPFUN report; + DRVSUPFUN init; +} drvHpe1368a={ + 2, + NULL, /*VXI io report takes care of this */ + init}; +static long init() +{ + hpe1368a_init(); + return(0); +} + #define VXI_MODEL_HPE1368A (0xf28) #define HPE1368A_PCONFIG(LA) \ diff --git a/src/drv/drvKscV215.c b/src/drv/drvKscV215.c index a4bc12b10..f9fe4669b 100644 --- a/src/drv/drvKscV215.c +++ b/src/drv/drvKscV215.c @@ -33,7 +33,7 @@ * ----------------- * .01 071792 joh Added model name registration * .02 081992 joh vxiUniqueDriverID -> epvxiUniqueDriverID - * .03 082692 mrk Added support for new I/O event scanning + * .03 082692 mrk Added support for new I/O event scanning and DRVET * */ @@ -50,10 +50,30 @@ #include #include #include +#include +#include #ifndef EPICS_V2 #include #endif + +long init(); +struct { + long number; + DRVSUPFUN report; + DRVSUPFUN init; +} drvKscV215={ + 2, + NULL, /* VXI report takes care of this */ + init}; + + +static long init() +{ + KscV215Init(); + return(0); +} + #define VXI_MODEL_KSCV215 (0x215) #define MAXTRIES 100 @@ -438,7 +458,7 @@ register unsigned short *prval; } #ifndef EPICS_V2 -KscV215_at5vxi_getioscanpvt(la,scanpvt) +KscV215_getioscanpvt(la,scanpvt) unsigned short la; IOSCANPVT *scanpvt; { diff --git a/src/drv/drvXy220.c b/src/drv/drvXy220.c index bddecd3e8..34e8ca2e9 100644 --- a/src/drv/drvXy220.c +++ b/src/drv/drvXy220.c @@ -137,6 +137,7 @@ int xy220_driver_init(){ pbo_xy220s[i] = 0; } } + return(0); } /* diff --git a/src/drv/drvXy240.c b/src/drv/drvXy240.c index 2d170bc95..ecdc7d707 100644 --- a/src/drv/drvXy240.c +++ b/src/drv/drvXy240.c @@ -240,7 +240,7 @@ register initialization } #ifndef EPICS_V2 -xy240_bi_getioscanpvt(card,scanpvt) +xy240_getioscanpvt(card,scanpvt) unsigned short card; IOSCANPVT *scanpvt; { diff --git a/src/drv/drvXy566.c b/src/drv/drvXy566.c index a420e23d1..95dbba568 100644 --- a/src/drv/drvXy566.c +++ b/src/drv/drvXy566.c @@ -100,8 +100,7 @@ static char SccsId[] = "$Id$\t$Date$ "; * senb/senw Writes to the 566 where the call provides a req'd delay */ -/* If any of the following does not exist replace it with #define <> NULL */ - + long report(); long init(); @@ -114,7 +113,7 @@ struct { report, init}; - + static long report() { ai_xy566_io_report(); @@ -127,7 +126,7 @@ static long init() xy566_init(); return(0); } - + #define MAX_SE_CARDS (ai_num_cards[XY566SE]) #define MAX_DI_CARDS (ai_num_cards[XY566DI]) #define MAX_DIL_CARDS (ai_num_cards[XY566DIL])