|
@ -0,0 +1,27 @@ |
|
|
|
|
|
// LED application in C by |
|
|
|
|
|
// Gerado Marx Chavez Campos |
|
|
|
|
|
// 26/04/2021 |
|
|
|
|
|
// |
|
|
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include<stdio.h> |
|
|
|
|
|
#include<stdlib.h> |
|
|
|
|
|
#include<string.h> |
|
|
|
|
|
|
|
|
|
|
|
#define LED3PATH "/sys/class/leds/beaglebone:green:usr3" |
|
|
|
|
|
|
|
|
|
|
|
//Function prototypes |
|
|
|
|
|
void WriteLED(char fileName[], char value[]); |
|
|
|
|
|
void RemoveTrigger(); |
|
|
|
|
|
|
|
|
|
|
|
//main |
|
|
|
|
|
int main(int argc, char* argvp[]){ |
|
|
|
|
|
if(argc!=2){ |
|
|
|
|
|
printf("Incorrect use..."); |
|
|
|
|
|
return 2; |
|
|
|
|
|
} |
|
|
|
|
|
printf("LED Application Done"); |
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
|
|
|
|