Subject: |
Re: Question: module_types.h |
From: |
[email protected] (Jeff Hill) |
Date: |
Tue, 2 Aug 94 09:44:52 MDT |
>
> I'm in the process of trying to add a VME driver to module_types.h
> and seem to be running into problems. Can anyone tell me where to look for the
> definitions of MT_DEF_PARM and MODULE_TYPES_INIT?
The C macro MODULE_TYPES_DEF facilitates the inclusion of module_types.h
into many source modules without allocating storage for the variables
declared within in all of these modules. The parameter MODULE_TYPES_INIT
is defined in the single source module that allocates storage for the
parameters.
MT_DEF_PARM is a parameter to the macro MODULE_TYPES_DEF(MT_DEF_PARM)
which is defined in module_types.h.
For example the definition:
#define MODULE_TYPES_DEF(MT_DEF_PARM) extern MT_DEF_PARM;
MODULE_TYPES_DEF(short ai_num_cards[MAX_AI_TYPES+1])
results in:
extern short ai_num_cards[MAX_AI_TYPES+1];
> I'm having problems adding a
> 13th module. I add the appropriate information to the ai lists (address, number
> of cards, etc...), but it seems to ignore it and instead set the value to the
> first entry in the successive list. (and yes, MAX_AI_TYPES is set correctly
>
Most likely your problem results from share/src/db/iocInit.c
needing to be recompiled. This is the one module
that defines MODULE_TYPES_INIT.
It is also possible to modify __existing__ parameters by making
changes to a private copy of share/src/drv/module_types.c.
Recompile this module and reload it after you load iocCore. Next, call
the module_types() entry point from the vxWorks shell just prior to calling
iocInit from the shell (module_types() isnt called by iocInit).
I will add a short section on this source of confusion to the
"writing a device driver" notes that I am preparing.
Jeff
______________________________________________________________________
Jeffrey O. Hill Internet [email protected]
LANL MS H820 Voice 505 665 1831
Los Alamos, NM USA 87545 FAX 505 665 5107
- Navigate by Date:
- Prev:
Question: module_types.h LUCAS
- Next:
Granville-Phillips VG-307 vs GPIB Bill Brown
- 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:
Question: module_types.h LUCAS
- Next:
Granville-Phillips VG-307 vs GPIB Bill Brown
- 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
|