jba 3/21/91

This commit is contained in:
Janet B. Anderson
1991-03-22 15:19:06 +00:00
parent a6339fb924
commit b2ccd32adf
34 changed files with 811 additions and 995 deletions
+4 -15
View File
@@ -36,19 +36,7 @@ struct {
init_record,
NULL,
read_mbbi};
static long masks[] = {
0x00000000,
0x00000001, 0x00000003, 0x00000007, 0x0000000f,
0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
};
static long init_record(pmbbi)
struct mbbiRecord *pmbbi;
{
@@ -57,7 +45,8 @@ static long init_record(pmbbi)
/* mbbi.inp must be an VME_IO */
switch (pmbbi->inp.type) {
case (VME_IO) :
pmbbi->mask = masks[pmbbi->nobt]<<pmbbi->inp.value.vmeio.signal;
pmbbi->shft = pmbbi->inp.value.vmeio.signal;
pmbbi->mask <<= pmbbi->shft;
break;
default :
strcpy(message,pmbbi->name);
@@ -67,7 +56,7 @@ static long init_record(pmbbi)
}
return(0);
}
static long read_mbbi(pmbbi)
struct mbbiRecord *pmbbi;
{
@@ -79,7 +68,7 @@ static long read_mbbi(pmbbi)
pvmeio = (struct vmeio *)&(pmbbi->inp.value);
status = bi_driver(pvmeio->card,pmbbi->mask,BB910,&value);
if(status==0) {
pmbbi->rval = value >> pvmeio->signal;
pmbbi->rval = value;
} else {
if(pmbbi->nsev<MAJOR_ALARM ) {
pmbbi->nsta = READ_ALARM;