B4J Programming Press on the image to return to the main documentation page.

rOneWire

List of types:

OneWire

OneWire


Events:

None

Members:


  CRC16 (Data() As Byte, Length As UInt) As UInt

  CRC8 (Data() As Byte, Length As Byte) As Byte

  Initialize (WirePin As Byte) As void

  ReadBytes (Bytes() As Byte, Count As UInt) As void

  Reset As Boolean

  ResetSearch As void

  Search (Address() As Byte) As Boolean

  Select (Address() As Byte) As void

  Skip As void

  Write (Value As Byte, Power As Boolean) As void

  WriteBytes (Bytes() As Byte, Power As Boolean) As void

Members description:

CRC16 (Data() As Byte, Length As UInt) As UInt
Computes a Dallas Semiconductor 16 bit CRC.
Data - Array with the bytes to checksum.
Length - Number of bytes to use.
CRC8 (Data() As Byte, Length As Byte) As Byte
Computes a Dallas Semiconductor 8 bit CRC.
Data - Array with the bytes to checksum.
Length - Number of bytes to use.
Initialize (WirePin As Byte) As void
Initializes the object. Sets the OneWire pin.
ReadBytes (Bytes() As Byte, Count As UInt) As void
Reads data.
Bytes - Data will be written to this array.
Count - Number of bytes to read.
Reset As Boolean
Performs a reset function. Returns True if the device asserted a presence pulse.
ResetSearch As void
Clears the search state. The next search will start from the beginning.
Search (Address() As Byte) As Boolean
Searches for the next device. Returns True if a device was found.
The order of devices is deterministic.
Address - 8 bytes array. The address of the device found will be written to this array.
Select (Address() As Byte) As void
Issues a select command. This is needed after each call to Reset.
Skip As void
Skips the device selection. Useful when there is only a single device connected.
Write (Value As Byte, Power As Boolean) As void
Writes a byte.
Value - Value to write.
Power - Set to True if power after the write is needed.
WriteBytes (Bytes() As Byte, Power As Boolean) As void
Writes bytes.
Bytes - Data to write.
Power - Set to True if power after the write is needed.
Top