#include<stdio.h>
|
|
#include<stdlib.h>
|
|
#include<string.h>
|
|
|
|
#define LED3P "/sys/class/leds/beaglebone:green:usr3"
|
|
|
|
int main() {
|
|
FILE* fp;
|
|
char fullFile[100];
|
|
//trigger non
|
|
sprintf(fullFile, LED3P "%s", "/trigger");
|
|
fp = fopen(fullFile, "w+");
|
|
fprintf(fp, "%s", "none");
|
|
fclose(fp);
|
|
// Led on
|
|
sprintf(fullFile, LED3P "%s", "/brightness");
|
|
fp = fopen(fullFile, "w+");
|
|
fprintf(fp, "%s", "1");
|
|
fclose(fp);
|
|
printf("Done\n");
|
|
return 0;
|
|
}
|