std/dev: adapt mbbiDirect/mbboDirect soft support to 32bit
This commit is contained in:
@@ -47,7 +47,7 @@ epicsExportAddress(dset, devMbbiDirectSoft);
|
|||||||
|
|
||||||
static long init_record(mbbiDirectRecord *prec)
|
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;
|
prec->udf = FALSE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -56,7 +56,7 @@ static long init_record(mbbiDirectRecord *prec)
|
|||||||
static long readLocked(struct link *pinp, void *dummy)
|
static long readLocked(struct link *pinp, void *dummy)
|
||||||
{
|
{
|
||||||
mbbiDirectRecord *prec = (mbbiDirectRecord *) pinp->precord;
|
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;
|
if (status) return status;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ typedef struct devPvt {
|
|||||||
struct {
|
struct {
|
||||||
DBRstatus
|
DBRstatus
|
||||||
DBRtime
|
DBRtime
|
||||||
epicsUInt16 value;
|
epicsUInt32 value;
|
||||||
} buffer;
|
} buffer;
|
||||||
} devPvt;
|
} devPvt;
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ static void getCallback(processNotify *ppn, notifyGetType type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert(type == getFieldType);
|
assert(type == getFieldType);
|
||||||
pdevPvt->status = dbChannelGetField(ppn->chan, DBR_USHORT,
|
pdevPvt->status = dbChannelGetField(ppn->chan, DBR_LONG,
|
||||||
&pdevPvt->buffer, &pdevPvt->options, &no_elements, 0);
|
&pdevPvt->buffer, &pdevPvt->options, &no_elements, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ static long init(int pass)
|
|||||||
|
|
||||||
static long init_record(mbbiDirectRecord *prec)
|
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;
|
prec->udf = FALSE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
static long write_mbbo(mbboDirectRecord *prec)
|
static long write_mbbo(mbboDirectRecord *prec)
|
||||||
{
|
{
|
||||||
dbPutLink(&prec->out, DBR_USHORT, &prec->val, 1);
|
dbPutLink(&prec->out, DBR_LONG, &prec->val, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ static long write_mbbo(mbboDirectRecord *prec)
|
|||||||
if (prec->pact)
|
if (prec->pact)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
status = dbPutLinkAsync(plink, DBR_USHORT, &prec->val, 1);
|
status = dbPutLinkAsync(plink, DBR_LONG, &prec->val, 1);
|
||||||
if (!status)
|
if (!status)
|
||||||
prec->pact = TRUE;
|
prec->pact = TRUE;
|
||||||
else if (status == S_db_noLSET)
|
else if (status == S_db_noLSET)
|
||||||
status = dbPutLink(plink, DBR_USHORT, &prec->val, 1);
|
status = dbPutLink(plink, DBR_LONG, &prec->val, 1);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user