Driver Question + Network Stack Question

Hi all,

I’ve read most of the QNX programming tutorials (included in the qnxnc621.iso) and really liked the way things are done in QNX :wink:

I want to ask how is the hardware accessed in a resource manager. For example if I want to write a serial port driver. I know how Linux does this and how DOS does it. Is there something like ioperm() in QNX that grants me access to specified memory address since memory protection will kill any access to 0x3f8 :slight_smile: (or I’m wrong ?)

Can you also point me some code examples for real device drivers.

Since I’m using QNX NC (6.2.1) can I write protocol module extention to io-net with this version. For example I want to write AODV or OSLR support for QNX. Can I do this without buying $8k version :slight_smile:

Any code/documentation welcome :exclamation: :exclamation: :exclamation:

Thanks in advance

Check the DDK source codes in /usr/src
If you don’t have that directory, you need to “finish” your QNX 6.2.1 installation. Just put the CD back into the drive, start the “QNX Installer”, choose and install the “QNX Momemtics for x86”.

I have /usr/src/ddk-XXX and i’ve figured out how to communicate with devices :slight_smile: According to some articles

#include <sys/neutrino.h>
#include <hw/inout.h>

#define PORT_NUMBER 0x03FF

ThreadCtl(_NTO_TCTL_IO,0);

unsigned char dataReadFromPort = in8(PORT_NUMBER);

unsigned char dataToWriteToPort=0;
out8(PORT_NUMBER,dataToWriteToPort);

must be enough to read/write to port.

But what about my second question - where I can find information (is it FREE) about writing protocol stacks/extentions modules for io-net ? Forgive me if it’s in Network DDK, I haven’t reached it yet :slight_smile: