owAccess (Function) |
Top Previous Next |
This function will select a 1-Wire device and prepare it for device-specific commands. The device must first have been discovered with owSearchX.
This will also acquire the 1-Wire lock - thus allowing no other threads access to the 1-Wire net until it has been released by calling owRelease. Failing to do so will result in an fault 148 (see Fault codes for further details).
The lock can be refreshed with another call to owAccess but owRelease must be called the same number of times before all locks are released.
Input: family : INT [0..255] (default 0) Family code of the device to access/select.
device : INT [1..50] (default 1) Device number within the applied family.
Returns: INT
Declaration: FUNCTION owAccess : INT;
Example:
Please see the "Examples - Generic OneWire Example" |