Updated from git.drogon.net

This commit is contained in:
Phil Howard
2016-02-27 16:03:10 +00:00
parent ddf1b3ffaa
commit 26c7fe3332
151 changed files with 17346 additions and 1343 deletions

View File

@@ -39,27 +39,26 @@
#include <wiringPi.h>
#include <softPwm.h>
// The OK/Act LED is connected to BCM_GPIO pin 16
#define OK_LED 16
int main ()
{
int fd, i ;
wiringPiSetupGpio () ;
// Change the trigger on the OK/Act LED to "none"
if ((fd = open ("/sys/class/leds/led0/trigger", O_RDWR)) < 0)
{
fprintf (stderr, "Unable to change LED trigger: %s\n", strerror (errno)) ;
return 1 ;
}
write (fd, "none\n", 5) ;
close (fd) ;
if (wiringPiSetupGpio () < 0)
{
fprintf (stderr, "Unable to setup GPIO: %s\n", strerror (errno)) ;
return 1 ;
}
softPwmCreate (OK_LED, 0, 100) ;
for (;;)