OneWire Library for Arduino  version: 1.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
OneWire::RomCommands Namespace Reference

Procedural 1-Wire ROM Commands for enumerating and selecting devices. More...

Classes

struct  SearchState
 State used by all ROM ID search functions. More...
 

Enumerations

enum  OwRomCmd {
  ReadRomCmd = 0x33, MatchRomCmd = 0x55, SearchRomCmd = 0xF0, SkipRomCmd = 0xCC,
  ResumeCmd = 0xA5, OverdriveSkipRomCmd = 0x3C, OverdriveMatchRomCmd = 0x69
}
 

Functions

OneWireMaster::CmdResult OWFirst (OneWireMaster &master, SearchState &searchState)
 Find the 'first' devices on the 1-Wire bus. More...
 
OneWireMaster::CmdResult OWNext (OneWireMaster &master, SearchState &searchState)
 Find the 'next' devices on the 1-Wire bus. More...
 
OneWireMaster::CmdResult OWVerify (OneWireMaster &master, const RomId &romId)
 Verify that the device with the specified ROM ID is present. More...
 
OneWireMaster::CmdResult OWReadRom (OneWireMaster &master, RomId &romId)
 
OneWireMaster::CmdResult OWSkipRom (OneWireMaster &master)
 
OneWireMaster::CmdResult OWMatchRom (OneWireMaster &master, const RomId &romId)
 
OneWireMaster::CmdResult OWOverdriveSkipRom (OneWireMaster &master)
 
OneWireMaster::CmdResult OWOverdriveMatchRom (OneWireMaster &master, const RomId &romId)
 
OneWireMaster::CmdResult OWResume (OneWireMaster &master)
 
OneWireMaster::CmdResult OWSearch (OneWireMaster &master, SearchState &searchState)
 

Detailed Description

Procedural 1-Wire ROM Commands for enumerating and selecting devices.

Enumeration Type Documentation

Enumerator
ReadRomCmd 
MatchRomCmd 
SearchRomCmd 
SkipRomCmd 
ResumeCmd 
OverdriveSkipRomCmd 
OverdriveMatchRomCmd 

Function Documentation

OneWireMaster::CmdResult OneWire::RomCommands::OWFirst ( OneWireMaster &  master,
SearchState &  searchState 
)

Find the 'first' devices on the 1-Wire bus.

OneWireMaster::CmdResult OneWire::RomCommands::OWMatchRom ( OneWireMaster &  master,
const RomId &  romId 
)

Use the Match ROM command to select the device by its known ID.

Note
This command causes all devices supporting Overdrive mode to switch to Overdrive timing.
Parameters
[in]romIdROM ID of device to select.
OneWireMaster::CmdResult OneWire::RomCommands::OWNext ( OneWireMaster &  master,
SearchState &  searchState 
)

Find the 'next' devices on the 1-Wire bus.

OneWireMaster::CmdResult OneWire::RomCommands::OWOverdriveMatchRom ( OneWireMaster &  master,
const RomId &  romId 
)

Use the Overdrive Match ROM command to select the device by its known ID.

Parameters
[in]romIdROM ID of device to select.
OneWireMaster::CmdResult OneWire::RomCommands::OWOverdriveSkipRom ( OneWireMaster &  master)

Issue Overdrive Skip ROM command on bus.

Note
This command causes all devices supporting Overdrive mode to switch to Overdrive timing.
Only use this command with a single drop bus, data collisions will occur if more than 1 device on bus.
OneWireMaster::CmdResult OneWire::RomCommands::OWReadRom ( OneWireMaster &  master,
RomId &  romId 
)

Use Read ROM command to read ROM ID from device on bus.

Note
Only use this command with a single drop bus, data collisions will occur if more than 1 device on bus.
Parameters
[out]romIdROM ID read from device.
OneWireMaster::CmdResult OneWire::RomCommands::OWResume ( OneWireMaster &  master)

Perform a Resume ROM command on bus.

Resumes communication with the last device selected though a Match ROM or Search ROM operation.

OneWireMaster::CmdResult OneWire::RomCommands::OWSearch ( OneWireMaster &  master,
SearchState &  searchState 
)

Find device on the 1-Wire bus.

This command uses the Search ROM command to enumerate all 1-Wire devices in sequence. Begin with a new search state and continue using the same search state until the last device flag is set which indicates that all devices have been discovered.

OneWireMaster::CmdResult OneWire::RomCommands::OWSkipRom ( OneWireMaster &  master)

Issue Skip ROM command on bus.

Note
Only use this command with a single drop bus, data collisions will occur if more than 1 device on bus.
OneWireMaster::CmdResult OneWire::RomCommands::OWVerify ( OneWireMaster &  master,
const RomId &  romId 
)

Verify that the device with the specified ROM ID is present.