SERINtimeout
 
Syntax


extern int SERINtimeout;

 

Description

The default time that SERIN waits for input on pins 0-31 is 0.5 seconds.

This may be changed using this statement.  The timeout will be set in micro-seconds.

Example

// set the timeout shorter on for polling an LCD/keypad combination to 100 ms
SERINtimeout = 100000;
   ...

proc GetKey() {
    LCDcmd[0] = 24;
    LCDlen = 0;
    GenCRC();
    SEROUT (1,LCDbaud,1,LCDlen+3,LCDcmd);
    SERIN  (1,LCDbaud,1,3,LCDcmd); 
}

See also