Functional Description
3-13
ETI Device Files
1
Each ETI is accessed through its own special device file:
/dev/rcim:
N
/eti
M
where
N
is the RCIM card number (starting from zero) and
M
is the ID of the ETI.
These files are created automatically on system boot by the
/etc/init.d/rcim
initialization script.
User Interface to ETIs
1
An ETI is controlled by
open(2)
,
close(2)
, and
ioctl(2)
system calls. Note that
this device does not support the
read(2)
,
write(2)
or
mmap(2)
system calls.
The
open
call assigns a file descriptor to one edge-triggered interrupt and verifies that the
interrupt is not currently being used by another device driver. One device file exists for
each edge-triggered interrupt. A
close
call frees the file descriptor and removes any
attached signals. Refer to the man pages for more information.
The following commands to
ioctl
are used to manipulate the ETIs. These commands
c a n a l s o b e a p p l i e d t o D I s . A l l
i o c t l
c a l l s u s e t h e c o n s t a n t s d e f i n e d i n
/usr/include/rcim.h
. Refer to the
rcim_eti(4)
man page for more information.
ETI_ARM
arms the ETI
ETI_DISARM
disarms the ETI
ETI_ENABLE
enables the ETI
ETI_DISABLE
disables the ETI
ETI_REQUEST
generates a software requested interrupt
ETI_INFO
gets information about the ETI
ETI_WAIT
causes the process to sleep
ETI_WAKEUP
wakes all sleeping processes
ETI_GETICNT
returns the number of times this ETI has fired
ETI_KEEPALIVE
sets or clears the keepalive state
ETI_VECTOR
gets the interrupt vector associated with ETI
IOCTLGETICNT
returns the number of times this ETI has fired (generic)
IOCTLKEEPALIVE
sets or clears the keepalive state (generic)
IOCTLVECNUM
sets the interrupt vector associated with ETI (generic)
IOCTLSIGATTACH
requests a signal when an RCIM device generates an interrupt
Note that like DIs, an ETI must be armed and enabled before an interrupt can be received.
Содержание RCIM
Страница 1: ...Real Time Clock and Interrupt Module RCIM User s Guide 0898007 1000 March 2021...
Страница 10: ...RCIM User s Guide 1 4...
Страница 32: ...RCIM User s Guide 2 22...
Страница 80: ...RCIM User s Guide A 28...
Страница 102: ...RCIM User s Guide C 2...