summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-08 11:23:39 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-08 11:23:39 -0500
commit3fd28fd880ad8026b041a66e536387e85780f2cb (patch)
tree2076f5ce11cff4434795c34a4bfc26b1f8df83b1
parent1f4c60785827ffb196d67d363c52b7704d552ef3 (diff)
changed test mode warning to only emit once during the thread
-rw-r--r--skey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/skey.c b/skey.c
index d08c140..f369c84 100644
--- a/skey.c
+++ b/skey.c
@@ -35,7 +35,9 @@ int skey_update_thread (void *data) {
const struct sched_param PARAM = { .sched_priority = 45};
sched_setscheduler(current, SCHED_FIFO, &PARAM);
printk(KERN_INFO "skey: started update thread\n");
-
+ if (!USE_GPIO) {
+ printk(KERN_ALERT "skey: currently in test mode with gpio use disabled\n");
+ }
while (1) {
if (USE_GPIO) {
//reads the keyboard
@@ -56,8 +58,6 @@ int skey_update_thread (void *data) {
gpio_set_value(column_pins[column_index], 0);
column_index++;
}
- } else {
- printk(KERN_ALERT "skey: currently in test mode with gpio use disabled\n");
}
//sleep 2000us= 2ms = 0.002 seconds
usleep_range(2000, 2000);