Paste2
Create Paste
Followup Paste
QR
int
button_is_pressed
()
{
/* the button is pressed when BUTTON_BIT is clear */
if
(
bit_is_clear
(
BUTTON_PIN
,
BUTTON_BIT
))
{
delay_ms
(
DEBOUNCE_TIME
);
if
(
bit_is_clear
(
BUTTON_PIN
,
BUTTON_BIT
))
return
1
;
}
return
0
;
}