changes for driver cleanup
This commit is contained in:
@@ -99,9 +99,9 @@ static long init_record(pai)
|
||||
|
||||
/* call driver so that it configures card */
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
if(status=ai_driver(pvmeio->card,pvmeio->signal,XY566DIL,&value)) {
|
||||
if(status=ai_xy566_driver(pvmeio->card,pvmeio->signal,XY566DIL,&value)) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566DiL (init_record) ai_driver error");
|
||||
strcat(message,": devAiXy566DiL (init_record) ai_xy566_driver error");
|
||||
errMessage(status,message);
|
||||
return(status);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ static long read_ai(pai)
|
||||
|
||||
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
status=ai_driver(pvmeio->card,pvmeio->signal,XY566DIL,&value);
|
||||
status=ai_xy566_driver(pvmeio->card,pvmeio->signal,XY566DIL,&value);
|
||||
if(status==-1) {
|
||||
status = 2; /*don't convert*/
|
||||
recGblSetSevr(pai,READ_ALARM,VALID_ALARM);
|
||||
@@ -142,11 +142,6 @@ static long read_ai(pai)
|
||||
recGblSetSevr(pai,HW_LIMIT_ALARM,VALID_ALARM);
|
||||
}
|
||||
if(status!=0) return(status);
|
||||
/*read into hardware as -0x7ff to +0x7ff */
|
||||
/* normalize to 0 - 0xfff */
|
||||
value = value + 0x800;
|
||||
/* remove the sign bit */
|
||||
value &= 0xfff;
|
||||
pai->rval = value;
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ static long init_record(pmbbo)
|
||||
pvmeio = &(pmbbo->out.value.vmeio);
|
||||
pmbbo->shft = pvmeio->signal;
|
||||
pmbbo->mask = pmbbo->shft;
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,XY220);
|
||||
status = xy220_read(pvmeio->card,pmbbo->mask,&value);
|
||||
if(status==0) pmbbo->rbv = pmbbo->rval = value;
|
||||
break;
|
||||
default :
|
||||
@@ -105,9 +105,9 @@ static long write_mbbo(pmbbo)
|
||||
|
||||
|
||||
pvmeio = &(pmbbo->out.value.vmeio);
|
||||
status = bo_driver(pvmeio->card,pmbbo->rval,pmbbo->mask,XY220);
|
||||
status = xy220_driver(pvmeio->card,pmbbo->rval,pmbbo->mask);
|
||||
if(status==0) {
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,XY220);
|
||||
status = xy220_read(pvmeio->card,pmbbo->mask,&value);
|
||||
if(status==0) pmbbo->rbv = value;
|
||||
else recGblSetSevr(pmbbo,READ_ALARM,VALID_ALARM);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user