From 3fd28fd880ad8026b041a66e536387e85780f2cb Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Fri, 8 Dec 2017 11:23:39 -0500 Subject: changed test mode warning to only emit once during the thread --- skey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'skey.c') 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); -- cgit v1.1