Functional Description
3-15
User Interface to RTCs
1
A real-time clock timer is controlled by
open(2)
,
close(2)
, and
ioctl(2)
system
calls. The
close
system call, if it closes the last open to the device, stops the RTC and
clears its settings unless the
IOCTLKEEPALIVE
ioctl
command was issued to the RTC
before the
close
.
The parameters passed through
ioctl
control the modes of the real-time clock timer, the
clock count value, and counting itself, as well as getting the current settings of the RTC.
This device does not support the
read(2)
and
write(1)
system calls.
The following commands to
ioctl
are used to manipulate the RTCs. All
ioctl
calls
use the constants defined in
/usr/include/rcim.h
. Refer to the
rcim_rtc(4)
man page for further information.
RTCIOCSETL
initializes RTC values (32-bit interface)
RTCIOCGETL
retrieves RTC values (32-bit interface)
RTCIOCSET
initializes RTC values (16-bit interface)
RTCIOCGET
retrieves RTC values (16-bit interface)
RTCIOCSETCNT
sets RTC clock count
RTCIOCMODCNT
modifies RTC clock count
RTCIOCGETCNT
gets RTC clock count
RTCIOCRES
gets RTC clock resolution
RTCIOCSTART
starts RTC counting
RTCIOCSTOP
stops RTC counting
RTCIOCWAIT
blocks until RTC clock count reaches zero
RTCIOCWAKEUP
wakes all sleeping processes
RTCIOCINFO
gets information about RTC
IOCTLGETICNT
returns the number of times this clock has fired
IOCTLVECNUM
sets interrupt vector for RTC
IOCTLKEEPALIVE
does not destroy the timer on final close
IOCTLSIGATTACH
requests a signal when this RTC generates an interrupt
External Output Interrupts
1
Each RCIM provides external output signals. These signals can be used as interrupt
sources for other machines or used as signals to control external devices. RCIM III and
RCIM II support twelve external output interrupts (0-11); RCIM I supports four (0-3).
The external output interrupts can be driven from one of several sources internal to the
RCIM. The most common source is from the programmable interrupt generators (PIGs).
PIGs provide full software control for generation of the output signals.
The pin-outs for the external interrupt connectors are described in Chapter 2.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание RCIM I
Страница 105: ...RCIM User s Guide B 4 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 109: ...Index 4 RCIM User s Guide Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 110: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 111: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...