summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-20 01:16:20 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-20 01:16:20 -0500
commit7569ea7bffb6a3496c07385c894b4c62c07df431 (patch)
treec2982506ecf6c0fa4d64f5ef11ed3b23f2b062b7
parent37263292a092b221d06b8ae1ddcf4b077eb47ba2 (diff)
added a small sleep between rpin state changes
-rw-r--r--skey.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/skey.c b/skey.c
index 9025664..ac9b19b 100644
--- a/skey.c
+++ b/skey.c
@@ -86,6 +86,8 @@ int skey_update_thread (void *data) {
while (row_index < 3) {
//sets the column pin high for reading
gpio_set_value(row_pins[row_index], 1);
+ //gives it some buffer time
+ usleep(10);
//reads with all the rows
column_index = 0;
while (column_index < 10) {
@@ -98,6 +100,7 @@ int skey_update_thread (void *data) {
}
//sets the row pin low
gpio_set_value(row_pins[row_index], 0);
+ usleep(10);
row_index++;
}
}