.TH dmaon() "" "" "Internal Kernel Routine"
.PC "Prepare for DMA transfer"
.B "#include <sys/types.h>"
\fBint dmaon(\fIchan\^\fB, \fIpaddr\^\fB, \fIcount\^\fB, \fIwflag\^\fB)\fR
\fBint \fIchan\^\fB, \fIwflag\^\fB; \fBpaddr_t \fIpaddr\^\fB; unsigned \fIcount\^\fB;\fR
.PP
.B dmaon()
programs DMA channel \fIchan\fR to transfer \fIcount\fR bytes
to or from physical-memory address \fIpaddr\fR.
If \fIwflag\fR is zero, the data are read from the device and written to memory.
.PP
If all goes well,
.B dmaon()
returns one.
It returns zero if a ``straddle condition'' arises \(em that is,
if an operation would cross the boundary of a 64-kilobyte ``hunk'' of
physical memory \(em because the DMA controller cannot handle this
situation.
.SH "See Also"
.B
internal kernel routines
.R
