diff options
author | knolax <1339802534.kk@gmail.com> | 2017-12-23 12:36:27 -0500 |
---|---|---|
committer | knolax <1339802534.kk@gmail.com> | 2017-12-23 12:36:27 -0500 |
commit | a6d6d0460bd36423ab06529646747364567ed1c6 (patch) | |
tree | 541d4b14b04e62735f80cb2fc8cd048f869fd2c5 /skey.c | |
parent | 7569ea7bffb6a3496c07385c894b4c62c07df431 (diff) |
changed the function calls to the linux gpio interface to their cansleep equivalents
Diffstat (limited to 'skey.c')
-rw-r--r-- | skey.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -85,13 +85,13 @@ int skey_update_thread (void *data) { int column_index = 0; while (row_index < 3) { //sets the column pin high for reading - gpio_set_value(row_pins[row_index], 1); + gpio_set_value_cansleep(row_pins[row_index], 1); //gives it some buffer time usleep(10); //reads with all the rows column_index = 0; while (column_index < 10) { - if (gpio_get_value(column_pins[column_index])) { + if (gpio_get_value_cansleep(column_pins[column_index])) { printk(KERN_INFO "skey: key pressed at column %d, row %d\n", column_index, row_index); } else { printk(KERN_INFO "skey: key not pressed at column %d, row %d\n", column_index, row_index); @@ -99,7 +99,7 @@ int skey_update_thread (void *data) { column_index++; } //sets the row pin low - gpio_set_value(row_pins[row_index], 0); + gpio_set_value_cansleep(row_pins[row_index], 0); usleep(10); row_index++; } |