Once the option processor has finished, all of the cards are initialized, and we've
entered the execute_resmgr() main processing loop.
From that point on, we are a resource manager, and we're waiting for requests.
The driver doesn't do anything on its own; it's entirely client-driven.
In iofuncs.c you see the one and only callout that we're providing,
namely the io_devctl() handler.
The io_devctl() handler is responsible for the following commands:
- DCMD_GET_CONFIG
- Returns the number of analog and digital I/O points, the analog I/O
resolution (number of bits), and the number of bytes per digital channel.
The data for the configuration comes from the constants in
the include file pcl711.h.
- DCMD_GET_ADIS
- Read the analog and digital inputs and return them to the client.
This is the main command that's used to get data out of the resource manager.
(ADIS stands for Analog/Digital InputS.)
The data originates from the card interface functions pcl711_read_analog() and pcl711_read_digital()
in pcl711.c.
- DCMD_SET_CPAO
- Writes one or more analog outputs.
This is the command that clients use to write analog data.
(CPAO is Channel and Port Analog Output.)
The data is handled by the card interface function pcl711_write_analog()
in pcl711.c.
- DCMD_SET_CPBDO
- Writes one or more digital output bits (not nybbles nor bytes).
This is the command that clients use to write digital data.
(CPBDO means Channel and Port Bit Digital Output).
The data is handled by the card interface function pcl711_write_digital_bit()
in pcl711.c
The other drivers (DIO-144 and ISO-813) are responsible for the same commands (and use similarly named
card interface functions), and return EINVAL for any commands that aren't appropriate.
So as far as the resource manager interface goes, it's very simple.
The real work gets done in the individual interface functions in pcl711.c
(and dio144.c and iso813.c for the other cards).