32
IBR115
User’s Manual
A.
How to Use GPIO in Linux
# Take gpio1_0 as example, export value:1*32+0=32
# GPIO example 1: Output
echo 32 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio40/direction
echo 0 > /sys/class/gpio/gpio40/value
echo 1 > /sys/class/gpio/gpio40/value
# GPIO example 2: Input
echo 32 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio40/direction
cat /sys/class/gpio/gpio40/value
B.
How to Use Watchdog in Linux
// create fd
int fd;
//open watchdog device
fd = open("/dev/watchdog", O_WRONLY);
//get watchdog support
ioctl(fd, WDIOC_GETSUPPORT, &ident);
//get watchdog status
ioctl(fd, WDIOC_GETSTATUS, &status);
//get watchdog timeout
ioctl(fd, WDIOC_GETTIMEOUT, &timeout_val);
//set watchdog timeout
ioctl(fd, WDIOC_SETTIMEOUT, &timeout_val);
//feed dog
ioctl(fd, WDIOC_KEEPALIVE, &dummy);
Summary of Contents for IBR115
Page 1: ...IBR115 NXP Cortex A9 i MX6 Dual Lite SoC User s Manual Version 1 0 Jan 2018...
Page 8: ...viii IBR115 User s Manual This page is intentionally left blank...
Page 15: ...General Information IBR115 User s Manual 7 1 1 7 Dimensions Unit mm...
Page 16: ...8 IBR115 User s Manual Unit mm Dimensions of the optional heatsink...
Page 20: ...12 IBR115 User s Manual 2 3 Jumper Connector Locations on IBR115 Board diagram of IBR115...
Page 39: ...31 Appendix This section provides the information of reference code...