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