Hi Burkhard,
int32Driver.c is a simulated driver, so it does not do real I/O. The int32Write and int32Read functions write and read the data from a private structure in the driver.
If you want a simple example of a VME register-based asynInt32 driver you can look at my driver for the Systran DAC-128V. It is here:
http://cars.uchicago.edu/software/epics/dac128V.html
Note that the source code for that driver is fine, but the documentation is out of date, it still refers to MPF, which predated of asyn.
Here is the asynInt32 write function in that driver:
static asynStatus writeInt32(void *drvPvt, asynUser *pasynUser,
epicsInt32 value)
{
drvDac128VPvt *pPvt = (drvDac128VPvt *)drvPvt;
int channel;
pasynManager->getAddr(pasynUser, &channel);
if(value<0 || value>pPvt->maxValue || channel<0 || channel>pPvt->lastChan)
return(-1);
pPvt->regs[channel] = value;
asynPrint(pasynUser, ASYN_TRACEIO_DRIVER,
"drvDac128V, port %s, wrote %d to channel %d\n",
pPvt->portName, value, channel);
return(0);
}
Mark
________________________________
From: [email protected] on behalf of Burkhard Kolb
Sent: Tue 4/8/2008 8:49 AM
To: '[email protected]'
Subject: Example for VME reg-based port driver for asyn on Linux?
Hi
I'm in the process of converting applications from VxWorks to Linux.
I have a multitude of VME boards with write/read registers (no
interrupts). On VxWorks I usually have built subRecords to access the
registers on the boards.
Now we use Concurrent single board cpus in VME (running linux) where the
use of mapping registers is restricted due to the large address space of
the cpus. So I would like to map the individual boards in an orderly
fashion via some register-board-base-addr call and then use for instance
asyn int32 support.
I have looked in the example int32Driver.c but can't see where the real
I/O is done?
Does anyone have some real example? Or is this sort of overkill?
Many thanks, Burkhard
--
Dr. Burkhard Kolb
KP1 / GSI
E-Mail: [email protected]
Tel: +49-(6159)-71-2667 / Fax: +49-(6159)-71-2185
Gesellschaft für Schwerionenforschung mbH
Planckstraße 1 / D-64291 Darmstadt / www.gsi.de
Gesellschaft mit beschränkter Haftung
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528
Geschäftsführer: Professor Dr. Horst Stöcker
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
- References:
- Example for VME reg-based port driver for asyn on Linux? Burkhard Kolb
- Navigate by Date:
- Prev:
Example for VME reg-based port driver for asyn on Linux? Burkhard Kolb
- Next:
The select record MEDIAN calculation Dennis Armstrong
- 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:
Example for VME reg-based port driver for asyn on Linux? Burkhard Kolb
- Next:
The select record MEDIAN calculation Dennis Armstrong
- 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
|