Hi everybody I need to set the I/O ports expecially I/OG 16-23 as Intput and I/OG 8-15 as Output. I tried using this C code but it seems not work.
#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
#include "sys/ioctl.h"
#include "fcntl.h"
#include "time.h"
#include "string.h"
#include "linux/gpio_syscalls.h"
int main(void) {
// set IOG 16-23 as input
gpiosetdir(PORTG, DIRIN, PG16_23);
// set IOG 8-15 as output
gpiosetdir(PORTG, DIROUT, PG8_15);
return 0;
}
Anyone can help me?
Please
