From: John Janus Date: Fri, 6 Oct 2017 07:32:53 +0000 (+0200) Subject: test with pulldown resistors X-Git-Url: https://git.johnzone.org/?a=commitdiff_plain;h=refs%2Fheads%2FpulldownTest;p=FakeRadio.git test with pulldown resistors --- diff --git a/simple_try.c b/simple_try.c index 528b643..50d6ba4 100644 --- a/simple_try.c +++ b/simple_try.c @@ -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); }