read_portb
Description
This function reads a set of noisey inputs tied to PORTB (typically
switches or relay contacts) and returns a debounced reading of the
selected inputs. This function takes a relatively long time to execute
since it looks for a stable reading of the inputs over a predefined
period of time. This period is calculated to overcome switch bounce and
should not be shortend.
Definition
ubyte read_portb(ubyte mask)
Library
LIB/debounce_lib.bas
Usage
On entry:
mask is a bit wise mask of all the inputs in PORTB which are to be read
On exit:
return true if the stable inputs on PORTB match mask, return false otherwise