Changes for compatibility with epics
This commit is contained in:
+1
-2
@@ -115,14 +115,13 @@
|
||||
#include <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
#include <epvxiLib.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#endif
|
||||
|
||||
static char SccsId[] = "$Id$\t$Date$";
|
||||
|
||||
typedef long (*DRVSUPFUN) (); /* ptr to driver support function*/
|
||||
|
||||
|
||||
void log_at5vxi_failure();
|
||||
void at5vxi_int_service();
|
||||
|
||||
@@ -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<<K))
|
||||
|
||||
+51
-3
@@ -1,6 +1,5 @@
|
||||
|
||||
/* fp.c */
|
||||
/*
|
||||
/* drvFp.c */
|
||||
/* share/src/drv $Id$
|
||||
* routines which are used to test and interface with the
|
||||
* FP10S fast protect module
|
||||
*
|
||||
@@ -49,6 +48,7 @@
|
||||
* .10 joh 071092 added scan task wakeup from ISR
|
||||
* .11 joh 071092 moved ivec allocation to module_types.h
|
||||
* .12 joh 072792 added soft reboot int disable
|
||||
* .13 mrk 090192 support epics I/O event scan, and added DRVET
|
||||
*/
|
||||
|
||||
|
||||
@@ -97,7 +97,34 @@ static char *sccsId = "$Id$\t$Date$";
|
||||
#endif
|
||||
|
||||
#include "module_types.h"
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#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
|
||||
|
||||
+27
-2
@@ -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 <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
|
||||
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 */
|
||||
|
||||
|
||||
+23
-1
@@ -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 <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
#include <epvxiLib.h>
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#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) \
|
||||
|
||||
+22
-2
@@ -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 <task_params.h>
|
||||
#include <fast_lock.h>
|
||||
#include <epvxiLib.h>
|
||||
#include <dbDefs.h>
|
||||
#include <drvSup.h>
|
||||
#ifndef EPICS_V2
|
||||
#include <dbScan.h>
|
||||
#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;
|
||||
{
|
||||
|
||||
@@ -137,6 +137,7 @@ int xy220_driver_init(){
|
||||
pbo_xy220s[i] = 0;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ register initialization
|
||||
}
|
||||
|
||||
#ifndef EPICS_V2
|
||||
xy240_bi_getioscanpvt(card,scanpvt)
|
||||
xy240_getioscanpvt(card,scanpvt)
|
||||
unsigned short card;
|
||||
IOSCANPVT *scanpvt;
|
||||
{
|
||||
|
||||
+3
-4
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user