]> Johnzone git - FakeRadio.git/commitdiff
test with pulldown resistors pulldownTest
authorJohn Janus <mail@johnzone.org>
Fri, 6 Oct 2017 07:32:53 +0000 (09:32 +0200)
committerJohn Janus <mail@johnzone.org>
Fri, 6 Oct 2017 07:32:53 +0000 (09:32 +0200)
simple_try.c

index 528b6435e48680dec5f435390219ce924c805221..50d6ba43402ec783061d197d891722f0e1caf163 100644 (file)
@@ -97,11 +97,11 @@ int main(void) {
     pinMode(CHNL2BTN, INPUT);
     pinMode(INTROBTN, INPUT);
     pinMode(HORNBTN, INPUT);
-    pullUpDnControl(PWRBTN, PUD_UP);
-    pullUpDnControl(CHNL1BTN, PUD_UP);
-    pullUpDnControl(CHNL2BTN, PUD_UP);
-    pullUpDnControl(INTROBTN, PUD_UP);
-    pullUpDnControl(HORNBTN, PUD_UP);
+    pullUpDnControl(PWRBTN, PUD_DOWN);
+    pullUpDnControl(CHNL1BTN, PUD_DOWN);
+    pullUpDnControl(CHNL2BTN, PUD_DOWN);
+    pullUpDnControl(INTROBTN, PUD_DOWN);
+    pullUpDnControl(HORNBTN, PUD_DOWN);
     if (wiringPiISR(PWRBTN, INT_EDGE_RISING, pwrBtn)) printf("failed to initialize pwrBtn\n");
     if (wiringPiISR(CHNL1BTN, INT_EDGE_RISING, chnl1Btn)) printf("failed to initialize chnl1Btn\n");
     if (wiringPiISR(CHNL2BTN, INT_EDGE_RISING, chnl2Btn)) printf("failed to initialize chnl2Btn\n");
@@ -172,9 +172,9 @@ int main(void) {
     digitalWrite(CHNL1LED, HIGH);
     digitalWrite(CHNL2LED, HIGH);
     digitalWrite(INTROLED, HIGH);
-    pullUpDnControl(PWRBTN, PUD_DOWN);
-    pullUpDnControl(CHNL1BTN, PUD_DOWN);
-    pullUpDnControl(CHNL2BTN, PUD_DOWN);
-    pullUpDnControl(INTROBTN, PUD_DOWN);
+    pullUpDnControl(PWRBTN, PUD_OFF);
+    pullUpDnControl(CHNL1BTN, PUD_OFF);
+    pullUpDnControl(CHNL2BTN, PUD_OFF);
+    pullUpDnControl(INTROBTN, PUD_OFF);
 }