DAADIO(4)

NAME
daadio - MATRIX MD-DAADIO digital/analog, analog/digital, parallel I/O board

SYNOPSIS
daadio* at fvme? addr 0x0 level 1 vect 0x1f

DESCRIPTION
The daadio driver provides ioctl(2) entry points to read and write analog/digital, digital/analog, and parallel input/output registers. A typical daadio has 6 8bit parallel ports, 8 12bit DAC ports, and 32 12bit ADC ports.

The daadio has a large number of configuration options, but the driver does not. For the ADC, only simple polled mode is supported (there is no support for single cycle sampling).

IOCTLS
The daadio device responds to the following ioctl(2) calls defined in <machine/daadioio.h>:

DIOGPIO
    (struct daadio_pio) Get the value of the parallel port dap_reg and store it in dap_val. The argument structure is defined as follows:

        struct daadio_pio {
                u_int8_t dap_reg;
                u_int8_t dap_val;
        };

DIOSPIO
    (struct daadio_pio) Set the value of the parallel port dap_reg to the value in dap_val.

DIOSDAC
    (struct daadio_dac) Set the value of the DAC port in dac_reg to the value in dac_val. The argument structure is defined as follows:

        struct daadio_dac {
                u_int8_t dac_reg;
                u_int16_t dac_val;
        };

DIOGADC
    (struct daadio_adc) Get the value of the ADC port specified in dad_reg into dad_val. The lower 12 bits of dad_val are the conversion value, the upper four bits are used for status. The argument structure is defined as follows:

        struct daadio_adc {
                u_int8_t dad_reg;
                u_int16_t dad_val;
        #define ADC_IV 0x1000 /* out of range */
        #define ADC_PR 0x2000 /* pipeline empty */
        #define ADC_DR 0x4000 /* data ready */
        #define ADC_OW 0x8000 /* data overwritten */
        #define ADC_VAL 0x0fff /* the data */
        };

SEE ALSO
ioctl(2), fvme(4), intro(4)

HISTORY
OpenBSD support for the daadio first appeared in OpenBSD 2.6.