aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-05-05 19:25:03 +0200
committerjaseg <code@jaseg.net>2016-05-05 19:25:03 +0200
commitf49a062cf261e70af5b045e5ae63a14dd80f452b (patch)
treecd28a93056ed48903faf54b9fae868a0a66471d4
parent698c35b23c7f3f43e47479ff158e71c7c331f918 (diff)
downloadcccb-klingel-f49a062cf261e70af5b045e5ae63a14dd80f452b.tar.gz
cccb-klingel-f49a062cf261e70af5b045e5ae63a14dd80f452b.tar.bz2
cccb-klingel-f49a062cf261e70af5b045e5ae63a14dd80f452b.zip
Allow ringing to be interrupted by further input
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 37451c6..6d8639d 100644
--- a/main.c
+++ b/main.c
@@ -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;