A C example to make work the LED on BeagleBone-Black and Pocket.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
430 B

3 years ago
  1. // LED application in C by
  2. // Gerado Marx Chavez Campos
  3. // 26/04/2021
  4. //
  5. //
  6. #include<stdio.h>
  7. #include<stdlib.h>
  8. #include<string.h>
  9. #define LED3PATH "/sys/class/leds/beaglebone:green:usr3"
  10. //Function prototypes
  11. void WriteLED(char fileName[], char value[]);
  12. void RemoveTrigger();
  13. //main
  14. int main(int argc, char* argvp[]){
  15. if(argc!=2){
  16. printf("Incorrect use...");
  17. return 2;
  18. }
  19. printf("LED Application Done");
  20. return 0;
  21. }