Watch
0
0
Fork
You've already forked klingel
0
mirror of synced 2026-09-08 07:20:06 +02:00

Allow ringing to be interrupted by further input

This commit is contained in:
jaseg 2016-05-05 19:25:03 +02:00
commit f49a062cf2

2
main.c
View file

@ -69,7 +69,7 @@ void ring(void) {
tx_str(PSTR("RING Ringing\r\n"));
PORTB |= 0x20;
PORTC |= 0x04;
for (uint16_t i=0; i<RING_DURATION_SEC*100 && !handle_open_button(); i++)
for (uint16_t i=0; i<RING_DURATION_SEC*100 && !handle_open_button() && (PINC&1); i++)
_delay_ms(10);
PORTB &= ~0x20;
PORTC &= ~0x04;