![background image](http://html1.mh-extra.com/html/ibase-technology/rp-103-smc/rp-103-smc_user-manual_604824089.webp)
Appendix
RP-103-SMC User Manual
81
1.
How to Use GPIO in Linux Dsdsd
# 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
2.
How to Use Watchdog in LinuxSdsd
// 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);
Содержание RP-103-SMC
Страница 15: ...Introduction RP 103 SMC User Manual 7 1 ...
Страница 17: ...Introduction RP 103 SMC User Manual 9 1 RP 103 SMC Dimensions ...
Страница 18: ...10 RP 103 SMC User Manual 1 4 I O View ...
Страница 20: ...12 Chapter 2 Jumpers and Connectors on the Carrier Board ...
Страница 48: ...40 RP 103 SMC User Manual CN24 SATA power RM N8QM only Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 50: ...42 RP 103 SMC User Manual CN26 SATA power Pin Signal Name 1 5V 2 GND 3 GND 4 12V ...
Страница 52: ...44 RP 103 SMC User Manual CN28 CAN2 3 Pin Signal Name 1 CAN2_H 2 CAN2_L 3 GND 4 CAN3_H 5 CAN3_L 6 GND ...
Страница 56: ...48 RP 103 SMC User Manual CN32 FAN Pin Signal Name 1 GND 2 12V 3 N C 4 N C ...
Страница 60: ...52 RP 103 SMC User Manual CN35 RTC BAT Pin Signal Name 1 LI_CELL 2 GND ...
Страница 76: ...68 RP 103 SMC User Manual This page is intentionally left blank ...