summaryrefslogtreecommitdiff
path: root/digital
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-28 11:50:56 +0200
committerJérémy Dufour2008-04-28 11:50:56 +0200
commitbb703f43be5cf817efe555cf8f91c19f6a8cb2be (patch)
treea6663b69e87c5fc8366af63bb39fde821e27af89 /digital
parenta48c26a13614dab1af11d3a6b46a6dc0921e2756 (diff)
* digital/io/src
- fix bug in the getter of the status of the jack ; - correct a possible error in the initialization of the chrono.
Diffstat (limited to 'digital')
-rw-r--r--digital/io/src/chrono.c2
-rw-r--r--digital/io/src/switch.avr.c5
2 files changed, 5 insertions, 2 deletions
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. */