std/dev: adapt mbbiDirect/mbboDirect soft support to 32bit

This commit is contained in:
2017-09-07 11:09:30 +02:00
committed by Ralph Lange
parent d9742d5240
commit ccc8f75ec7
4 changed files with 8 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ epicsExportAddress(dset, devMbbiDirectSoft);
static long init_record(mbbiDirectRecord *prec)
{
if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
if (recGblInitConstantLink(&prec->inp, DBR_LONG, &prec->val))
prec->udf = FALSE;
return 0;
@@ -56,7 +56,7 @@ static long init_record(mbbiDirectRecord *prec)
static long readLocked(struct link *pinp, void *dummy)
{
mbbiDirectRecord *prec = (mbbiDirectRecord *) pinp->precord;
long status = dbGetLink(pinp, DBR_USHORT, &prec->val, 0, 0);
long status = dbGetLink(pinp, DBR_LONG, &prec->val, 0, 0);
if (status) return status;

View File

@@ -41,7 +41,7 @@ typedef struct devPvt {
struct {
DBRstatus
DBRtime
epicsUInt16 value;
epicsUInt32 value;
} buffer;
} devPvt;
@@ -58,7 +58,7 @@ static void getCallback(processNotify *ppn, notifyGetType type)
}
assert(type == getFieldType);
pdevPvt->status = dbChannelGetField(ppn->chan, DBR_USHORT,
pdevPvt->status = dbChannelGetField(ppn->chan, DBR_LONG,
&pdevPvt->buffer, &pdevPvt->options, &no_elements, 0);
}
@@ -153,7 +153,7 @@ static long init(int pass)
static long init_record(mbbiDirectRecord *prec)
{
if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
if (recGblInitConstantLink(&prec->inp, DBR_LONG, &prec->val))
prec->udf = FALSE;
return 0;

View File

@@ -21,7 +21,7 @@
static long write_mbbo(mbboDirectRecord *prec)
{
dbPutLink(&prec->out, DBR_USHORT, &prec->val, 1);
dbPutLink(&prec->out, DBR_LONG, &prec->val, 1);
return 0;
}

View File

@@ -29,11 +29,11 @@ static long write_mbbo(mbboDirectRecord *prec)
if (prec->pact)
return 0;
status = dbPutLinkAsync(plink, DBR_USHORT, &prec->val, 1);
status = dbPutLinkAsync(plink, DBR_LONG, &prec->val, 1);
if (!status)
prec->pact = TRUE;
else if (status == S_db_noLSET)
status = dbPutLink(plink, DBR_USHORT, &prec->val, 1);
status = dbPutLink(plink, DBR_LONG, &prec->val, 1);
return status;
}