Hello,
I need to write a Dev driver for a IP module which gives us 4 RS232 serial
ports. All our hardware stuff is usually written in C++, not C so I was
hoping to leave the skeleton driver stuff all C and just compiiling as a C++
program to use our classes to access the hw. But this doesn’t really look
possible because in the _devdrvr.h header file there is a member of the
_driver_mount structure called “unsigned new”. Anyway around this?
Thanks.
Jon
Jonathan Richardson <jrichard@nospam.ise.bc.ca> wrote:
Hello,
I need to write a Dev driver for a IP module which gives us 4 RS232 serial
ports. All our hardware stuff is usually written in C++, not C so I was
hoping to leave the skeleton driver stuff all C and just compiiling as a C++
program to use our classes to access the hw. But this doesn’t really look
possible because in the _devdrvr.h header file there is a member of the
_driver_mount structure called “unsigned new”. Anyway around this?
I have a bad feeling about doing a Dev driver in C++. That aside,
make a local copy of the _devdrvr.h header file, change the element’s
name in the structure to something else… say “my_new”, find all references
to it in the driver code, and change them. Don’t change the element’s
position in the structure or size, just its name. Compiled code (library,
and Dev) won’t care what you call the element – once compiled, it only
cares about its offset from the start of the structure.
-David
QNX Training Services
dagibbs@qnx.com