Well I am pleased to say, that the callback problems are behind us. phew.
there might be a limited number of RM callbacks that you can allocate from the DPMI host.
Yes that's true, 16 actually is the minimum that should be provided. And I guess the best way is as suggested an array with the number of copies depending on the number of boards installed.
That way they all use he same code.
I dont think I am confused about the interupts, I have always thought of them as Close Interupts & Start Interupts. The doc's on dpmi definitely state that there is danger of the Int staying disabled if you dont specifically enable them when you are finished with the callback.
You don't need to restore the DS passed to you.....
Actually the final result is even better, the register struc has all the details I need. Although because it gets filled in as a result of an Int, I cant rely on it being the info from the Interface I want,
if another interface uses the same CallBack. So, by looking at the UserPktID, I will know which I/F but it is possible to miss an event completely,
if 2 Interfaces cause a CallBack within micro-Sec's.
I have noticed that when sending a command to an I/F the return registers (from usbuhcil) indicate "all OK", but a second or two later, the Host Controller will create the callback with a problem.
So if during that delay (which will more then likely happen) I comm with another I/F, then the danger of loosing a callback is real.
Once I get all the functions working correctly, I will then think about the best program logic to handle multiple I/F's.
Regards