Extended MaximInterface

Dependents:   mbed_DS28EC20_GPIO

Embed: (wiki syntax)

« Back to documentation index

DS2480B Class Reference

DS2480B Class Reference

Serial to 1-Wire Line Driver. More...

#include <DS2480B.hpp>

Inherits MaximInterface::OneWireMaster.

Inherited by DS9481P_300::DS2480BWithEscape.

Public Types

enum  ErrorValue
 

Result of all 1-Wire commands.

More...
enum  Speed
 

Speed of the 1-Wire bus.

More...
enum  Level
 

Level of the 1-Wire bus.

More...

Public Member Functions

virtual MaximInterface_EXPORT
error_code 
reset ()
 Reset all of the devices on the 1-Wire bus and check for a presence pulse.
virtual MaximInterface_EXPORT
error_code 
touchBitSetLevel (bool &sendRecvBit, Level afterLevel)
 Send and receive one bit of communication and set a new level on the 1-Wire bus.
virtual MaximInterface_EXPORT
error_code 
writeByteSetLevel (uint_least8_t sendByte, Level afterLevel)
 Send one byte of communication and set a new level on the 1-Wire bus.
virtual MaximInterface_EXPORT
error_code 
readByteSetLevel (uint_least8_t &recvByte, Level afterLevel)
 Receive one byte of communication and set a new level on the 1-Wire bus.
virtual MaximInterface_EXPORT
error_code 
setSpeed (Speed newSpeed)
 Set the 1-Wire bus communication speed.
virtual MaximInterface_EXPORT
error_code 
setLevel (Level newLevel)
 Set the 1-Wire bus level.
virtual MaximInterface_EXPORT
error_code 
writeBlock (span< const uint_least8_t > sendBuf)
 Send a block of communication on the 1-Wire bus.
virtual MaximInterface_EXPORT
error_code 
readBlock (span< uint_least8_t > recvBuf)
 Receive a block of communication on the 1-Wire bus.
virtual MaximInterface_EXPORT
error_code 
triplet (TripletData &data)
 1-Wire Triplet operation.
error_code writeBitSetLevel (bool sendBit, Level afterLevel)
 Send one bit of communication and set a new level on the 1-Wire bus.
error_code readBitSetLevel (bool &recvBit, Level afterLevel)
 Receive one bit of communication and set a new level on the 1-Wire bus.

Detailed Description

Serial to 1-Wire Line Driver.

Definition at line 44 of file DS2480B.hpp.


Member Enumeration Documentation

enum ErrorValue

Result of all 1-Wire commands.

Reimplemented from OneWireMaster.

Definition at line 46 of file DS2480B.hpp.

enum Level [inherited]

Level of the 1-Wire bus.

Definition at line 50 of file OneWireMaster.hpp.

enum Speed [inherited]

Speed of the 1-Wire bus.

Definition at line 47 of file OneWireMaster.hpp.


Member Function Documentation

error_code readBitSetLevel ( bool &  recvBit,
Level  afterLevel 
) [inherited]

Receive one bit of communication and set a new level on the 1-Wire bus.

Parameters:
[out]recvBitReceived data from the 1-Wire bus.
afterLevelLevel to set the 1-Wire bus to after communication.

Definition at line 134 of file OneWireMaster.hpp.

error_code readBlock ( span< uint_least8_t >  recvBuf ) [virtual, inherited]

Receive a block of communication on the 1-Wire bus.

Parameters:
[out]recvBufBuffer to receive the data from the 1-Wire bus.

Reimplemented in DS2465.

Definition at line 77 of file OneWireMaster.cpp.

error_code readByteSetLevel ( uint_least8_t &  recvByte,
Level  afterLevel 
) [virtual]

Receive one byte of communication and set a new level on the 1-Wire bus.

Parameters:
recvByteBuffer to receive the data from the 1-Wire bus.
afterLevelLevel to set the 1-Wire bus to after communication.

Reimplemented from OneWireMaster.

Definition at line 396 of file DS2480B.cpp.

error_code reset (  ) [virtual]

Reset all of the devices on the 1-Wire bus and check for a presence pulse.

Returns:
NoSlaveError if reset was performed but no presence pulse was detected.

Implements OneWireMaster.

Definition at line 252 of file DS2480B.cpp.

error_code setLevel ( Level  newLevel ) [virtual]

Set the 1-Wire bus level.

Implements OneWireMaster.

Definition at line 471 of file DS2480B.cpp.

error_code setSpeed ( Speed  newSpeed ) [virtual]

Set the 1-Wire bus communication speed.

Implements OneWireMaster.

Definition at line 436 of file DS2480B.cpp.

error_code touchBitSetLevel ( bool &  sendRecvBit,
Level  afterLevel 
) [virtual]

Send and receive one bit of communication and set a new level on the 1-Wire bus.

Parameters:
[in,out]sendRecvBitInput containing the bit to send and output containing the received bit.
afterLevelLevel to set the 1-Wire bus to after communication.

Implements OneWireMaster.

Definition at line 290 of file DS2480B.cpp.

error_code triplet ( TripletData &  data ) [virtual, inherited]

1-Wire Triplet operation.

Perform one bit of a 1-Wire search. This command does two read bits and one write bit. The write bit is either the default direction (all devices have same bit) or in case of a discrepancy, the data.writeBit parameter is used.

Parameters:
[in,out]dataInput with desired writeBit in case both read bits are zero. Output with all data fields set.

Reimplemented in DS2465, and DS2482_DS2484.

Definition at line 86 of file OneWireMaster.cpp.

error_code writeBitSetLevel ( bool  sendBit,
Level  afterLevel 
) [inherited]

Send one bit of communication and set a new level on the 1-Wire bus.

Parameters:
sendBitBit to send on the 1-Wire bus.
afterLevelLevel to set the 1-Wire bus to after communication.

Definition at line 126 of file OneWireMaster.hpp.

error_code writeBlock ( span< const uint_least8_t >  sendBuf ) [virtual, inherited]

Send a block of communication on the 1-Wire bus.

Parameters:
[in]sendBufBuffer to send on the 1-Wire bus.

Reimplemented in DS2465.

Definition at line 68 of file OneWireMaster.cpp.

error_code writeByteSetLevel ( uint_least8_t  sendByte,
Level  afterLevel 
) [virtual]

Send one byte of communication and set a new level on the 1-Wire bus.

Parameters:
sendByteByte to send on the 1-Wire bus.
afterLevelLevel to set the 1-Wire bus to after communication.

Reimplemented from OneWireMaster.

Definition at line 343 of file DS2480B.cpp.