Description
This function reads the last stable state of a noisey input such as a switch or relay contact.Unlike the polled functions (read_porta and read_portb), this function executes relatively quickly since the debouncing is performed in the background by the debounce driver
Definition
ubyte read_switch(ubyte id)Library
LIB/debounce_lib.basUsage
On entry:id is the bit number to read.On exit:
- Bits 0..7 are mapped to PORTA bits 0..7
- Bits 8..15 are mapped to PORTB bits 0..7
return true if the last stable state of the input is high (logic 1), return false otherwise