Moxa UC-7101-T-LX [36/46] Buzzer

Moxa UC-7101-T-LX [36/46] Buzzer
UC-7101/7110/7112 Software User’s Manual UC-7101/7110/7112 Device API
5-2
RTC (Real Time Clock)
The device node is located at /dev/rtc. The UC-7101/7110/7112 support µClinux standard
simple RTC control. You must include <linux/rtc.h> to use these functions.
1. Function: RTC_RD_TIME
int ioctl(fd, RTC_RD_TIME, struct rtc_time *time);
Description: Reads time information from RTC.
2. Function: RTC_SET_TIME
int ioctl(fd, RTC_SET_TIME, struct rtc_time *time);
Description: Sets RTC time.
Buzzer
The device node is located at /dev/console. The UC-7101/7110/7112 support µClinux
standard buzzer control. The UC-7101/7110/7112s buzzer runs at a fixed frequency of 100 Hz.
You must include <sys/kd.h> to use these functions.
1. Function: KDMKTONE
ioctl(fd, KDMKTONE, unsigned int arg);
Description: Buzzer will beep, as stipulated by the function arguments.
UART Interface
The normal tty device node is located at /dev/ttyM0ttyM1, and modem tty device node is
located at /dev/com0 … com1. The UC-7101/7110/7112 Series support µClinux standard termios
control. The Moxa UART Device API supports the configuration of ttyM0 to ttyM1 as
RS-232/422/485. To use these functions, after the Tool Chain package is installed, then include
<moxadevice.h> in your application.
#define RS232_MODE 0
#define RS485_2WIRE_MODE 1
#define RS422_MODE 2
#define RS485_4WIRE_MODE 3
1. Function: MOXA_SET_OP_MODE
int mode;
mode=which mode you want to set;
int ioctl(fd, MOXA_SET_OP_MODE, &mode)
Description: Sets the interface mode.
2. Function: MOXA_GET_OP_MODE
int mode;
int ioctl(fd, MOXA_GET_OP_MODE, &mode)
Description: Gets the interface mode.

Содержание

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

Скачать