Hi Konrad,
I suggest you create an issue in asyn on Github.
My questions:
Would we use the existing asynMask syntax but change "mask" to be something like 0x0F0;8 where the bits before the ; are the mask and the bits after are the shift?
field(INP,"@asynMask(portName,addr,mask,timeout)drvParams")
Or do we make a new asynMaskShift syntax like this?
field(INP,"@asynMaskShift(portName,addr,mask,shift,timeout)drvParams")
Would this apply to longin and longout records? Any other records that should support this syntax?
For longin first the mask is done in the driver and then the shift is done in device support?
For longout first the shift is done in device support and then the mask is done in the driver?
Is this a common enough use case to justify the change?
Mark
-----Original Message-----
From: Konrad, Martin [mailto:[email protected]]
Sent: Wednesday, May 9, 2018 8:02 AM
To: Mark Rivers <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Subject: devAsynUInt32Digital: add parameter for shifting?
Hi Mark,
devAsynUInt32Digital currently supports the following parameters:
field(INP,"@asynMask(portName,addr,mask,timeout)drvParams")
We are reading out a bunch of 32 bit registers containing smaller numbers like 4x 8 bit. The mask allows us to pick a subset of bits but the generic device support doesn't seem to allow us to shift them. To make that happen we are currently using an additional calc record. I'm wondering if this use case is common enough to justify adding another parameter for shifting?
-Martin
--
Martin Konrad
High Performance Controls Team Leader
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]
- References:
- devAsynUInt32Digital: add parameter for shifting? Konrad, Martin
- Navigate by Date:
- Prev:
Re: devAsynUInt32Digital: add parameter for shifting? Konrad, Martin
- Next:
EDM X/Y Plot segfaults Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: devAsynUInt32Digital: add parameter for shifting? Konrad, Martin
- Next:
EDM X/Y Plot segfaults Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
|