Collaboration diagram for SPI Digital I/O:
This simple driver supports digital I/O ports like relay outputs and optocoupler inputs.
Functions | |
u_long | SpiDigitalGet (ureg_t num) |
Query digital inputs. | |
void | SpiDigitalSet (ureg_t num, u_long bits) |
Set digital outputs. | |
void | SpiDigitalInit (ureg_t *inputs, ureg_t *outputs) |
Initialize the digital I/O shift register interface. |
|
Query digital inputs. SpiDigitalInit() must have been called by the application before calling this function. This routine does not check the validity of the parameter.
|
|
Set digital outputs. SpiDigitalInit() must have been called by the application before calling this function. This routine does not check the validity of any parameter.
|
|
Initialize the digital I/O shift register interface. This routine must be called before using the interface. Automatically detects the number of digital inputs and outputs. However, the method used is limited and may fail on fast changing inputs. The application should check the result for plausibility. It is save to call the routine more than once.
|