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

DS2413 1-Wire Dual Channel Addressable Switch. More...

#include <DS2413.h>

Inheritance diagram for OneWire::DS2413:
OneWire::OneWireSlave

Public Types

enum  CmdResult { Success, CommsReadError, CommsWriteError, OpFailure }
 Result of operations. More...
 
- Public Types inherited from OneWire::OneWireSlave
enum  CmdResult {
  Success, CommunicationError, CrcError, TimeoutError,
  OperationFailure
}
 

Public Member Functions

 DS2413 (RandomAccessRomIterator &selector)
 DS2413 constructor. More...
 
CmdResult pioAccessReadChA (uint8_t &val)
 pioAccessReadChA() More...
 
CmdResult pioAccessReadChB (uint8_t &val)
 pioAccessReadChB() More...
 
CmdResult pioAccessWriteChA (uint8_t val)
 pioAccessWriteChA() More...
 
CmdResult pioAccessWriteChB (uint8_t val)
 pioAccessWriteChB() More...
 
CmdResult pioAccessWriteChAB (uint8_t val)
 pioAccessWriteChAB() More...
 
- Public Member Functions inherited from OneWire::OneWireSlave
RomId romId () const
 
void setRomId (const RomId &romId)
 

Static Public Attributes

static const uint8_t DS2413_FAMILY_CODE = 0x3A
 

Additional Inherited Members

- Protected Member Functions inherited from OneWire::OneWireSlave
 OneWireSlave (RandomAccessRomIterator &selector)
 
OneWireMaster::CmdResult selectDevice () const
 Select this slave device by ROM ID. More...
 
OneWireMastermaster () const
 The 1-Wire master for this slave device. More...
 

Detailed Description

DS2413 1-Wire Dual Channel Addressable Switch.

The DS2413 is a dual-channel programmable I/O 1-Wire® chip. The PIO outputs are configured as open-drain and provide up to 20mA continuous sink capability and off-state operating voltage up to 28V. Control and sensing of the PIO pins is performed with a dedicated device-level command protocol. To provide a high level of fault tolerance in the end application, the 1-Wire I/O and PIO pins are all capable of withstanding continuous application of voltages up to 28V max. Communication and operation of the DS2413 is performed with the single contact Maxim 1-Wire serial interface.

Member Enumeration Documentation

Result of operations.

Enumerator
Success 
CommsReadError 
CommsWriteError 
OpFailure 

Constructor & Destructor Documentation

DS2413::DS2413 ( RandomAccessRomIterator selector)

DS2413 constructor.

On Entry:

Parameters
[in]owm- reference to 1-wire master

On Exit:

Returns

Member Function Documentation

DS2413::CmdResult DS2413::pioAccessReadChA ( uint8_t &  val)

pioAccessReadChA()

reads state of pio

On Exit:

Parameters
[out]val- lsb represents the state of the pio
Returns
CmdResult - result of operation
DS2413::CmdResult DS2413::pioAccessReadChB ( uint8_t &  val)

pioAccessReadChB()

reads state of pio

On Exit:

Parameters
[out]val- lsb represents the state of the pio
Returns
CmdResult - result of operation
DS2413::CmdResult DS2413::pioAccessWriteChA ( uint8_t  val)

pioAccessWriteChA()

writes to pio

On Entry:

Parameters
[in]val- lsb sets state of pio
Returns
CmdResult - result of operation
DS2413::CmdResult DS2413::pioAccessWriteChAB ( uint8_t  val)

pioAccessWriteChAB()

writes to pio

On Entry:

Parameters
[in]val- Bits 1:0 set PIOB and PIOB respectively
Returns
CmdResult - result of operation
DS2413::CmdResult DS2413::pioAccessWriteChB ( uint8_t  val)

pioAccessWriteChB()

writes to pio

On Entry:

Parameters
[in]val- lsb sets state of pio
Returns
CmdResult - result of operation

Member Data Documentation

const uint8_t OneWire::DS2413::DS2413_FAMILY_CODE = 0x3A
static

The documentation for this class was generated from the following files: