Mouse Programming and Serial Port Programming


I have a serial mouse system that I want to write the driver and support it
in qnx 4.

As a starting point, does any one know any online references or have sample
code that deals with serial port programming on qnx 4?

I know some basics of it, but if anyone who may know the details of the
execution threads when a logitech serial mouse for example is connected and
how does photon know how to update the displayed mouse cursor, can you
please let me know so I can ask you more questions?