![]() |
OneWire Library for Arduino
version: 1.0.0
|
DS2413 1-Wire Dual Channel Addressable Switch. More...
#include <DS2413.h>
Public Types | |
enum | CmdResult { Success, CommsReadError, CommsWriteError, OpFailure } |
Result of operations. More... | |
![]() | |
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... | |
![]() | |
RomId | romId () const |
void | setRomId (const RomId &romId) |
Static Public Attributes | |
static const uint8_t | DS2413_FAMILY_CODE = 0x3A |
Additional Inherited Members | |
![]() | |
OneWireSlave (RandomAccessRomIterator &selector) | |
OneWireMaster::CmdResult | selectDevice () const |
Select this slave device by ROM ID. More... | |
OneWireMaster & | master () const |
The 1-Wire master for this slave device. More... | |
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.
DS2413::DS2413 | ( | RandomAccessRomIterator & | selector | ) |
DS2413::CmdResult DS2413::pioAccessReadChA | ( | uint8_t & | val | ) |
reads state of pio
On Exit:
[out] | val | - lsb represents the state of the pio |
DS2413::CmdResult DS2413::pioAccessReadChB | ( | uint8_t & | val | ) |
reads state of pio
On Exit:
[out] | val | - lsb represents the state of the pio |
DS2413::CmdResult DS2413::pioAccessWriteChA | ( | uint8_t | val | ) |
writes to pio
On Entry:
[in] | val | - lsb sets state of pio |
DS2413::CmdResult DS2413::pioAccessWriteChAB | ( | uint8_t | val | ) |
writes to pio
On Entry:
[in] | val | - Bits 1:0 set PIOB and PIOB respectively |
DS2413::CmdResult DS2413::pioAccessWriteChB | ( | uint8_t | val | ) |
writes to pio
On Entry:
[in] | val | - lsb sets state of pio |
|
static |