Device interface library for multiple platforms including Mbed.
Dependents: DeepCover Embedded Security in IoT MaximInterface MAXREFDES155#
DS2480B Class Reference
Serial to 1-Wire Line Driver. More...
#include <DS2480B.hpp>
Inherits MaximInterfaceCore::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 MaximInterfaceDevices_EXPORT Core::Result< void > | reset () |
Reset all of the devices on the 1-Wire bus and check for a presence pulse. | |
virtual MaximInterfaceDevices_EXPORT Core::Result< bool > | touchBitSetLevel (bool sendBit, Level afterLevel) |
Send and receive one bit of communication and set a new level on the 1-Wire bus. | |
virtual MaximInterfaceDevices_EXPORT Core::Result< void > | writeByteSetLevel (uint_least8_t sendByte, Level afterLevel) |
Send one byte of communication and set a new level on the 1-Wire bus. | |
virtual MaximInterfaceDevices_EXPORT Core::Result< uint_least8_t > | readByteSetLevel (Level afterLevel) |
Receive one byte of communication and set a new level on the 1-Wire bus. | |
virtual MaximInterfaceDevices_EXPORT Core::Result< void > | setSpeed (Speed newSpeed) |
Set the 1-Wire bus communication speed. | |
virtual MaximInterfaceDevices_EXPORT Core::Result< void > | setLevel (Level newLevel) |
Set the 1-Wire bus level. | |
virtual MaximInterfaceCore_EXPORT Result< void > | writeBlock (span< const uint_least8_t > sendBuf) |
Send a block of communication on the 1-Wire bus. | |
virtual MaximInterfaceCore_EXPORT Result< void > | readBlock (span< uint_least8_t > recvBuf) |
Receive a block of communication on the 1-Wire bus. | |
virtual MaximInterfaceCore_EXPORT Result< TripletData > | triplet (bool sendBit) |
1-Wire Triplet operation. | |
Result< void > | writeBitSetLevel (bool sendBit, Level afterLevel) |
Send one bit of communication and set a new level on the 1-Wire bus. | |
Result< bool > | readBitSetLevel (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 51 of file OneWireMaster.hpp.
enum Speed [inherited] |
Speed of the 1-Wire bus.
Definition at line 48 of file OneWireMaster.hpp.
Member Function Documentation
Receive one bit of communication and set a new level on the 1-Wire bus.
- Parameters:
-
afterLevel Level to set the 1-Wire bus to after communication.
- Returns:
- Received data from the 1-Wire bus.
Definition at line 135 of file OneWireMaster.hpp.
Result< void > readBlock | ( | span< uint_least8_t > | recvBuf ) | [virtual, inherited] |
Receive a block of communication on the 1-Wire bus.
- Parameters:
-
[out] recvBuf Buffer to receive the data from the 1-Wire bus.
Reimplemented in DS2465.
Definition at line 72 of file OneWireMaster.cpp.
Receive one byte of communication and set a new level on the 1-Wire bus.
- Parameters:
-
afterLevel Level to set the 1-Wire bus to after communication.
- Returns:
- Data received from the 1-Wire bus.
Reimplemented from OneWireMaster.
Definition at line 377 of file DS2480B.cpp.
Result< void > 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 250 of file DS2480B.cpp.
Set the 1-Wire bus communication speed.
Implements OneWireMaster.
Definition at line 415 of file DS2480B.cpp.
Send and receive one bit of communication and set a new level on the 1-Wire bus.
- Parameters:
-
sendBit Bit to send on the 1-Wire bus. afterLevel Level to set the 1-Wire bus to after communication.
- Returns:
- Bit received from the 1-Wire bus.
Implements OneWireMaster.
Definition at line 284 of file DS2480B.cpp.
Result< OneWireMaster::TripletData > triplet | ( | bool | sendBit ) | [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:
-
sendBit Bit to send in case both read bits are zero.
Reimplemented in DS2465, and DS2482_DS2484.
Definition at line 79 of file OneWireMaster.cpp.
Send one bit of communication and set a new level on the 1-Wire bus.
- Parameters:
-
sendBit Bit to send on the 1-Wire bus. afterLevel Level to set the 1-Wire bus to after communication.
Definition at line 126 of file OneWireMaster.hpp.
Result< void > writeBlock | ( | span< const uint_least8_t > | sendBuf ) | [virtual, inherited] |
Send a block of communication on the 1-Wire bus.
- Parameters:
-
[in] sendBuf Buffer to send on the 1-Wire bus.
Reimplemented in DS2465.
Definition at line 65 of file OneWireMaster.cpp.
Send one byte of communication and set a new level on the 1-Wire bus.
- Parameters:
-
sendByte Byte to send on the 1-Wire bus. afterLevel Level to set the 1-Wire bus to after communication.
Reimplemented from OneWireMaster.
Definition at line 329 of file DS2480B.cpp.
Generated on Tue Jul 12 2022 11:13:20 by 1.7.2