I have written a keyboard driver for the Palm OS, and I am having a problem
with SrmOpen()
Due to the event driven nature of the keyboard, we have to patch
sysTrapEvtEnqueueKey.
During that patched trap the following call fails:
Err error = errNone;
UInt32 nsmPresent = 0;
UInt16 serRef = 0;
// is the new serial manager installed? check the feature
error = FtrGet(sysFileCSerialMgr, sysFtrNewSerialPresent, &nsmPresent);
// if the new serial manager is present, try and open the port
// if not, then we will jump straight to the end and return false
if(!error && nsmPresent != 0)
{
// ** If we are reset during a hotsync, we crash here... **
// the new serial manager is present, open the serial port
error = SrmOpen(serPortID, serPortBaudRate, &serRef);
// ** If we are reset during a hotsync, we crash here... **
}
etc...
On PalmOS 4.0 this all works fine
On PalmOS 3.5, it works unless the device is reset during a HotSync, at
which point it will crash when called
On PalmOS 3.3 it fails period.
Any ideas?
--
Toby Boreham
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/