Technical Description
Sealevel Systems
ISO-16
Page
8
Programming
Application Programmers Interface (API)
Most modern operating systems do not allow direct hardware access. The
SeaIO driver and API have been included to provide control over the hardware
in Windows and Linux environments.
The purpose of this section of the manual is to help the customer with the
mapping of the API to the actual input for the 3094 specifically. Complete
documentation of the API can be found in its accompanying help file.
Interrupts
Interrupt sampling can be set up in the API. Port A bit zero is the interrupt
source. Refer to the API help file for more detailed information.
Relative Addressing Vs. Absolute Addressing
The SeaIO API makes a distinction between “absolute” and “relative”
addressing modes. In absolute addressing mode, the Port argument to the API
function acts as a simple byte offset from the base I/O address of the device.
For instance, Port #0 refers to the I/O address base + 0; Port #1 refers to the
I/O address base + 1.
Relative addressing mode, on the other hand, refers to input and output ports in
a logical fashion. With a Port argument of 0 and an API function meant to
output data, the first (0
th
) output port on the device will be utilized. Likewise,
with a Port argument of 0 and an API function designed to input data, the first
(0
th
) input port of the device will be utilized.
In all addressing modes, port numbers are zero-indexed; that is, the first port is
port #0, the second port is #1, the third #2, and so on.
Because the 3094 does not have any output ports, the mapping of relative and
absolute addressing is the same.