Functions | |
void | initialize () |
uint8_t | read (uint8_t pin) |
uint8_t | read () |
The panel has 8 buttons named KEY1 to KEY8. PORTB is connected to the buttons of the panel. Buttons are pushed if the port value is low. PORTB0 - KEY1 PORTB1 - KEY2 PORTB2 - KEY3 PORTB3 - KEY4 PORTB4 - KEY5 PORTB5 - KEY6 PORTB6 - KEY7 PORTB7 - KEY8
void button::initialize | ( | ) |
Initializes PORTB to input.
uint8_t button::read | ( | ) |
Gets the state of all buttons as a number. Highest bit is KEY1, lowest bit is KEY8. Bit value is 1 if the button is pressed, 0 if it is released.
uint8_t button::read | ( | uint8_t | pin | ) |
Gets the state of the button.
pin | Pin of the button |