From bb703f43be5cf817efe555cf8f91c19f6a8cb2be Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 28 Apr 2008 11:50:56 +0200 Subject: * digital/io/src - fix bug in the getter of the status of the jack ; - correct a possible error in the initialization of the chrono. --- digital/io/src/chrono.c | 2 +- digital/io/src/switch.avr.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'digital/io/src') diff --git a/digital/io/src/chrono.c b/digital/io/src/chrono.c index 95384455..4244fbd2 100644 --- a/digital/io/src/chrono.c +++ b/digital/io/src/chrono.c @@ -66,7 +66,7 @@ chrono_init (void) #ifndef HOST /* Presaler = 256 */ TCCR1B = regv (ICNC1, ICES1, 5, WGM13, WGM12, CS12, CS11, CS10, - 0, 1, 0, 0, 0, 1, 0, 0); + 0, 0, 0, 0, 0, 1, 0, 0); /* Enable overflow interrupt */ set_bit (TIMSK, TOIE1); #endif diff --git a/digital/io/src/switch.avr.c b/digital/io/src/switch.avr.c index dcc35765..44e8f36e 100644 --- a/digital/io/src/switch.avr.c +++ b/digital/io/src/switch.avr.c @@ -131,7 +131,10 @@ switch_get_color (void) static inline uint8_t switch_get_jack_raw (void) { - return bit_is_set (SWITCH_JACK_PIN, SWITCH_JACK_PIN_NUMBER); + if (bit_is_set (SWITCH_JACK_PIN, SWITCH_JACK_PIN_NUMBER)) + return 1; + else + return 0; } /* Get the value of the jack with filtering. */ -- cgit v1.2.3