diff options
author | knolax <1339802534.kk@gmail.com> | 2017-12-23 13:02:34 -0500 |
---|---|---|
committer | knolax <1339802534.kk@gmail.com> | 2017-12-23 13:02:34 -0500 |
commit | 70808229cd320f955839cb7ff7664bffe852d203 (patch) | |
tree | c8ab4acd9663da65ba6129db97f9299a8063945e | |
parent | c8fb72f0bce3a452d51ed095277b3a59878f19a4 (diff) |
making a test, gpio output seems unresponsive at all
-rw-r--r-- | skey.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -70,20 +70,19 @@ int skey_update_thread (void *data) { int i = 0; int j = 0; while (1) { - i++; - i = i % 500; if (!i) { printk(KERN_INFO "skey: update thread printed to kernel log every 1s\n"); //reports the a button pressed input_report_key(skey_dev,KEY_CAPSLOCK,j); input_sync(skey_dev); j = !j; + gpio_set_value(row_pins[0],j); } if (USE_GPIO) { //reads the keyboard int row_index = 0; int column_index = 0; - while (row_index < 3) { + /*while (row_index < 3) { //sets the column pin high for reading gpio_set_value_cansleep(row_pins[row_index], 0); //gives it some buffer time @@ -102,7 +101,7 @@ int skey_update_thread (void *data) { gpio_set_value_cansleep(row_pins[row_index], 1); usleep_range(10,10); row_index++; - } + }*/ } //sleep 2000us= 2ms = 0.002 seconds //usleep_range(2000, 2000); |