Commit 81342391 authored by Your Name's avatar Your Name
Browse files

lslder_uni update

parent 4b4599b1
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -196,15 +196,10 @@ int main(int argc, char *argv[]) {
for (int i = 0; i < ngpio; i++) {
int bcmgpio = gpioinp[i]; // BCM GPIO number
if (gpioSetMode(bcmgpio, PI_INPUT) < 0) {
perror("gpioSetMode");
return 1;
}
if (gpioSetPullUpDown(bcmgpio, PI_PUD_UP) < 0) {
perror("gpioSetMode");
return 1;
}
//if (gpioSetMode(bcmgpio, PI_INPUT) < 0) {
// perror("gpioSetMode");
// return 1;
// }
debouncetimes[i] = default_debouncetime;
......@@ -216,6 +211,11 @@ int main(int argc, char *argv[]) {
perror("gpioSetISRFunc");
return 1;
}
if (gpioSetPullUpDown(bcmgpio, PI_PUD_UP) < 0) {
perror("gpioSetMode");
return 1;
}
#ifdef DEBUG
std::cout << "Set IRQ handler for gpio " << bcmgpio << std::endl;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment