|
|
@ -14,7 +14,7 @@ void removeTrigger(); |
|
|
|
//main: |
|
|
|
//////////////////////////////////////////////////////// |
|
|
|
int main(int argc, char* argv[]){ |
|
|
|
printf("Starting app"); |
|
|
|
printf("Starting app \n"); |
|
|
|
|
|
|
|
if(argc!=2){ |
|
|
|
printf("Incorrect number of arguments"); |
|
|
@ -22,24 +22,24 @@ int main(int argc, char* argv[]){ |
|
|
|
} |
|
|
|
|
|
|
|
if(strcmp(argv[1], "on")==0){ |
|
|
|
printf("LED on"); |
|
|
|
printf("LED on \n"); |
|
|
|
removeTrigger(); |
|
|
|
writeLED(bled, "1"); |
|
|
|
printf("Done"); |
|
|
|
} |
|
|
|
|
|
|
|
else if (strcmp(argv[1], "off")==0){ |
|
|
|
printf("LED off"); |
|
|
|
printf("LED off \n"); |
|
|
|
removeTrigger(); |
|
|
|
writeLED(bled, "0"); |
|
|
|
printf("Done"); |
|
|
|
} |
|
|
|
|
|
|
|
else if (strcmp(argv[1], "blink")==0){ |
|
|
|
printf("LED blinking"); |
|
|
|
printf("LED blinking \n"); |
|
|
|
writeLED(tled, "timer"); |
|
|
|
writeLED("/delay_on", "50"); |
|
|
|
writeLED("/delay_off", "50"); |
|
|
|
writeLED("/delay_on", "500"); |
|
|
|
writeLED("/delay_off", "500"); |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|