Hi guys~
i want to using GPIO, UART of yy3568 with Unity3D.
Here is part of my Source
[DllImport(“libYY3568GPIO”)] private static extern int gpio_direction(int gpio, int dir);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_set_edge(int gpio, int rising, int falling);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_export(int gpio);
[DllImport(“libYY3568GPIO”)] private static extern void gpio_unexport(int gpio);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_getfd(int gpio);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_read(int gpio);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_write(int gpio, int val);
[DllImport(“libYY3568GPIO”)] private static extern int gpio_select(int gpio);
int gpio_pin = 28;
// Start is called before the first frame update
void Start()
{
int res = gpio_export(gpio_pin); // I got Error at here, the return value is -1
Debug.Log(“gpio_export res = " + res);
gpio_direction(gpio_pin, 1); //and also i gor error " perror(“Couldn’t open IRQ file”);”
}
plz help me what i have to do, it is my first time to develop for embedded sys.