Moxa DA-662A-I-8-LX [53/63] Buzzer

Moxa DA-662A-I-8-LX [53/63] Buzzer
DA-662A Series Software Programmer's Guide
5-6
RTC (Real-time Clock)
The device node is located at /dev/rtc. DA-662A series supports Linux standard simple RTC control. You must
include <linux/rtc.h>.
1. Function: RTC_RD_TIME
int ioctl(fd, RTC_RD_TIME, struct rtc_time *time);
Description: read time information from RTC. It will return the value on argument 3.
2. Function: RTC_SET_TIME
int ioctl(fd, RTC_SET_TIME, struct rtc_time *time);
Description: set RTC time. Argument 3 will be passed to RTC.
Buzzer
The DA-662A series supports buzzer control running at a fixed frequency of 100 Hz. The buzzer‘s on/off
behavior is controlled by software. You may write a shell script to control it. The following sample shell script
is provided for reference.
Example:
#! /bin/sh
cd /sys/class/gpio
echo 10 > export
cd /sys/class/gpio/gpio10
echo out > direction
# echo 1 > value means to turn on the buzzer
echo 1 > value
# echo 0 > value means to turn off the buzzer
echo 0 > value
WDT (Watchdog Timer)
1. Introduction
The WDT works like a watchdog function. You can enable it or disable it. When the user enables WDT but the
application does not acknowledge it, the system will reboot. You can set the ack time from a minimum of 50
msec to a maximum of 60 seconds.
2. How the WDT works
The sWatchDog is enabled when the system boots up. The kernel will auto ack it. The user application can
also enable ack. When the user does not ack, it will let the system reboot.
Kernel boot
.....
....
User application running and enable user ack
....
....

Содержание

Похожие устройства

Скачать