summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/comm
diff options
context:
space:
mode:
authorAndreas.Eversberg2010-07-18 14:56:48 +0200
committerAndreas.Eversberg2010-07-18 14:56:48 +0200
commit8d2ed53b45bf0f344d5f6f78cd165772e8a15dee (patch)
treeed4538370bfc84ecc8f9544730f2a5816284e860 /src/target/firmware/comm
parent[layer23] Option "no location-updating" to disabled location updating (diff)
downloadosmocom-8d2ed53b45bf0f344d5f6f78cd165772e8a15dee.tar.gz
osmocom-8d2ed53b45bf0f344d5f6f78cd165772e8a15dee.tar.xz
osmocom-8d2ed53b45bf0f344d5f6f78cd165772e8a15dee.zip
[calypso] Rework of keypad interrupt handler.
The keys are correctly detected and debounced. There is no delay_ms in the interrupt handler anymore. When a key is pressed, the columns of the keypad are polled and debounced via timer interrupt. If no key is pressed, the timer interrupt is ignored again.
Diffstat (limited to 'src/target/firmware/comm')
-rw-r--r--src/target/firmware/comm/timer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/target/firmware/comm/timer.c b/src/target/firmware/comm/timer.c
index d69ef54..9799cfc 100644
--- a/src/target/firmware/comm/timer.c
+++ b/src/target/firmware/comm/timer.c
@@ -27,6 +27,8 @@
#include <calypso/timer.h>
#include <calypso/irq.h>
+#include <keypad.h>
+
static LLIST_HEAD(timer_list);
unsigned long volatile jiffies;
@@ -189,6 +191,8 @@ static void timer_irq(enum irq_nr irq)
{
/* we only increment jiffies here. FIXME: does this need to be atomic? */
jiffies++;
+
+ keypad_poll();
}
void timer_init(void)