From: John Janus Date: Sun, 27 Aug 2017 11:55:21 +0000 (+0200) Subject: cleanup X-Git-Url: https://git.johnzone.org/?a=commitdiff_plain;h=34157e25616e1e0afdf707961401c8d6ab518c66;p=FakeRadio.git cleanup --- diff --git a/simple_try.c b/simple_try.c index d55a5fc..f53943e 100644 --- a/simple_try.c +++ b/simple_try.c @@ -2,6 +2,7 @@ #include #include #include +#include #define PWRLED 8 #define CHNL1LED 9 @@ -18,7 +19,6 @@ static volatile bool chnl1 = true; void ctrlCHandler(int dummy) { running = false; return; - } void pwrBtn(void) { @@ -61,6 +61,7 @@ int main(void) { digitalWrite(PWRLED, HIGH); digitalWrite(CHNL1LED, HIGH); digitalWrite(CHNL2LED, HIGH); + sleep(0.3); continue; } digitalWrite(PWRLED, LOW); @@ -71,12 +72,16 @@ int main(void) { digitalWrite(CHNL2LED, LOW); digitalWrite(CHNL1LED, HIGH); } - delay(200); + //delay(200); + sleep(0.3); } printf("ShuttingDown\n"); digitalWrite(PWRLED, HIGH); digitalWrite(CHNL1LED, HIGH); digitalWrite(CHNL2LED, HIGH); + pullUpDnControl(PWRBTN, PUD_DOWN); + pullUpDnControl(CHNL1BTN, PUD_DOWN); + pullUpDnControl(CHNL2BTN, PUD_DOWN); }