Serial time-outs are in ticks.
Do not leave the serial port open if you are not using it. It draws tons of
power. If I remember correctly, you Palm on in idle will draw 4-6mA,
backlighting adds 30-40mA, serial port open adds another 40-60mA. Run the
Palm with the serial port open and you dramatically reduce the battery life.
I think the best I've been able to get is 30hrs with the port on, 60hrs
using the serial port once every 5 seconds (leaving it open for less than
1/2 sec). Its been a while since I checked the numbers (and only with my
Pro and III, I haven't tried my IIIx or V yet)
There is a way to use a receive only handler, I've never used it. If you
have access to the OS source, you could look at the Beam receive section.
Otherwise, I don't know of any example code.
-----Original Message-----
From: Michael S. Davis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, September 27, 1999 11:13 AM
Subject: Re: Serial I/O Problem - READ FIRST - Disregard my previous
>
>What is the purpose of the timeout? I thought that it was a time that
>was set to return from the routine, in case data was not received, to
>prevent hanging. If it is too long, I wait needlessly. If it is too
>short, I return before all chars are input. Correct? At 19,200 I
>should receive characters at the rate of two every milli-second or
>something like that. What is timeout spec'd in (tics, milli, etc)?
>
>
>Relating to this: I don't see anything about power consumption. If I
>have an app that is open for some time, should I use SerOpen in, say,
>StartApplication and SerClose in StopApplication then SerReceive with
>a button push. Or, should the button push Open, Receive, Close all
>in the same function? I guess a better way of asking this is when does
>power start to be used; upon Open or Receive?
>
>
>Hmmm...
>
>
>Actually, I would prefer to get the characters one at a time. It suits
>my needs better. I used 7 chars, as an example, but the real number is
>a repeated string of 130 chars.
>
>One last thing, is there a way to get these characters on with an event
>handler or do I have to just sit and poll for them.
>
>Thanks
>
>Mike
>