diff --git a/src/std/rec/mbbiDirectRecord.c b/src/std/rec/mbbiDirectRecord.c index 74cc3d1f9..1d603ab5a 100644 --- a/src/std/rec/mbbiDirectRecord.c +++ b/src/std/rec/mbbiDirectRecord.c @@ -120,9 +120,9 @@ static long init_record(mbbiDirectRecord *prec, int pass) if (prec->siol.type == CONSTANT) recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval); - /* Initialize MASK if the user didn't */ - if (prec->mask == 0) - prec->mask = (1 << prec->nobt) - 1; + /* Initialize MASK if the user set NOBT instead */ + if (prec->mask == 0 && prec->nobt <= 32) + prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1; if (pdset->init_record) { status = pdset->init_record(prec); diff --git a/src/std/rec/mbbiRecord.c b/src/std/rec/mbbiRecord.c index 9c1ec6fd1..bfc4fdba6 100644 --- a/src/std/rec/mbbiRecord.c +++ b/src/std/rec/mbbiRecord.c @@ -137,9 +137,9 @@ static long init_record(mbbiRecord *prec, int pass) if (prec->siol.type == CONSTANT) recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval); - /* Initialize MASK if the user didn't */ - if (prec->mask == 0) - prec->mask = (1 << prec->nobt) - 1; + /* Initialize MASK if the user set NOBT instead */ + if (prec->mask == 0 && prec->nobt <= 32) + prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1; if (pdset->init_record) status = pdset->init_record(prec); diff --git a/src/std/rec/mbbiRecord.dbd b/src/std/rec/mbbiRecord.dbd index bbb9fd17a..ffc37cfaf 100644 --- a/src/std/rec/mbbiRecord.dbd +++ b/src/std/rec/mbbiRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(mbbi) { include "dbCommon.dbd" @@ -15,7 +14,7 @@ recordtype(mbbi) { asl(ASL0) pp(TRUE) } - field(NOBT,DBF_SHORT) { + field(NOBT,DBF_USHORT) { prompt("Number of Bits") promptgroup(GUI_MBB) special(SPC_NOMOD) diff --git a/src/std/rec/mbboDirectRecord.c b/src/std/rec/mbboDirectRecord.c index 728f99d74..ae43bdcf2 100644 --- a/src/std/rec/mbboDirectRecord.c +++ b/src/std/rec/mbboDirectRecord.c @@ -123,9 +123,9 @@ static long init_record(mbboDirectRecord *prec, int pass) if (recGblInitConstantLink(&prec->dol, DBF_USHORT, &prec->val)) prec->udf = FALSE; - /* Initialize MASK if the user didn't */ - if (prec->mask == 0) - prec->mask = (1 << prec->nobt) - 1; + /* Initialize MASK if the user set NOBT instead */ + if (prec->mask == 0 && prec->nobt <= 32) + prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1; if (pdset->init_record) { status = pdset->init_record(prec); diff --git a/src/std/rec/mbboRecord.c b/src/std/rec/mbboRecord.c index 4655638c4..ffb6f1eed 100644 --- a/src/std/rec/mbboRecord.c +++ b/src/std/rec/mbboRecord.c @@ -143,9 +143,9 @@ static long init_record(mbboRecord *prec, int pass) if (recGblInitConstantLink(&prec->dol, DBF_USHORT, &prec->val)) prec->udf = FALSE; - /* Initialize MASK if the user didn't */ - if (prec->mask == 0) - prec->mask = (1 << prec->nobt) - 1; + /* Initialize MASK if the user set NOBT instead */ + if (prec->mask == 0 && prec->nobt <= 32) + prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1; if (pdset->init_record) { status = pdset->init_record(prec); diff --git a/src/std/rec/mbboRecord.dbd b/src/std/rec/mbboRecord.dbd index 5920a0c76..1a32ad1cd 100644 --- a/src/std/rec/mbboRecord.dbd +++ b/src/std/rec/mbboRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(mbbo) { include "dbCommon.dbd" @@ -29,7 +28,7 @@ recordtype(mbbo) { interest(1) menu(menuOmsl) } - field(NOBT,DBF_SHORT) { + field(NOBT,DBF_USHORT) { prompt("Number of Bits") promptgroup(GUI_MBB) special(SPC_NOMOD)