Hi Juergen,

In the FriendlyARM linux examples they show that the LEDs (IO) can be
accessed in the following manner:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>

int main(int argc, char **argv)
{
    int led_state = 1;
    int led_no = 0;
    int fd;

    fd = open("/dev/leds0", 0);
    if (fd < 0) {
        fd = open("/dev/leds", 0);
    }
    if (fd < 0) {
        perror("open device leds");
        exit(1);
    }
    ioctl(fd, led_state, led_no);
    close(fd);
    return 0;
}

In the oselas documentation they show one can access the leds through
/sys/class/leds. How would one access the peripherals or IOs in PTXdist
using C?
Is there any example programs?
-- 
ptxdist mailing list
[email protected]

Reply via email to