int main (void) { system_init (); led_init (); button_init (); while (1) { if (button_pressed_p ()) { led_on (); } else { led_off (); } } }
/** Poll the specified button and return its debounced state. @param button pointer to button object @return button state */ button_state_t button_poll (button_t button) { return button_debounce (button, button_pressed_p (button)); }