On Mon, Sep 25, 2000 at 09:33:01AM +0100, Metalle Gary-GMETALL1 wrote:
> Rik
>
> That won't work. I can't guarantee when my data will arrive, so I will
> likely miss it if I open the port, wait and then relinquish it (it's a
> keyboard driver). I could try opening the port once and setting a global
> variable. But when do I close it? No one could do a hotsync if I hogged the
> port. Actually I think having just written that I'm sure I tried that,
> opening the port using SrmOpenBackground(). I didn't seem to get anywhere
> there either. Perhaps I didn't try hard enough! Still leaves the question as
> to when to relinquish hold of the port (perhaps not so much a problem if
> opened as Background only).
>
> Gary
You must maintain the port opened as long as you need to look for
data. If you are doing a keyboard driver, maybe you could use a
heartbeat or check if the other serial lines are active indicating
keyboard present.
For hotsync, you could look for the Hotsync app launch or something
else opening the serial port and bypass your hack until a close serial
port.
Also note this disables beam receive.
If you close the port, you will lose any data between that and the
next open.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/