![background image](http://html1.mh-extra.com/html/ibase-technology/ibr117/ibr117_user-manual_3250139040.webp)
32
IBR117
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 IBR117
Page 1: ...IBR117 3 5 ARM based SBC With NXP Cortex A9 Dual Core i MX6 User s Manual Version 1 0 May 2018...
Page 8: ...viii IBR117 User s Manual This page is intentionally left blank...
Page 15: ...General Information IBR117 User s Manual 7 1 1 7 Dimensions Unit mm...
Page 16: ...8 IBR117 User s Manual IBR117 Reference Heat Sink...
Page 20: ...12 IBR117 User s Manual 2 3 Jumper Connector Locations on IBR117 Board diagram of IBR117...
Page 39: ...31 Appendix This section provides the information of reference code...