Enumeration for button activity to button logical state mapping.
When a button is active high, it implies that the logical voltage state of the button is high (1, VCC) when the button is "activated", e.g. when a push-button is pushed, and low (0, GND) when the button is not activated. Similarly, a button that is active low reads logic low (0, GND) when activated and logic high (1, VCC) when not activated.
Button implementations are expected to set the button_state
toggle to 1 when the button is active, as in e.g. inputs.button_state = read_gpio() == active_level
where read_gpio()
reads the GPIO the button is attached to and active_level
is a ButtonActive
value.