Extended MaximInterface
Dependents: mbed_DS28EC20_GPIO
DS2482_800 Class Reference
DS2482-800 I2C to 1-Wire Master. More...
#include <DS2482_DS2484.hpp>
Inherits MaximInterface::DS2482_DS2484.
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 | |
MaximInterface_EXPORT error_code | selectChannel (int channel) |
Select the active 1-Wire channel. | |
MaximInterface_EXPORT error_code | initialize (Config config=Config()) |
Initialize hardware for use. | |
MaximInterface_EXPORT error_code | writeConfig (Config config) |
Write a new configuration to the device. | |
virtual MaximInterface_EXPORT error_code | triplet (TripletData &data) |
1-Wire Triplet operation. | |
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 | 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 | 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 | 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. | |
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. | |
Protected Member Functions | |
error_code | sendCommand (uint_least8_t cmd) const |
error_code | sendCommand (uint_least8_t cmd, uint_least8_t param) const |
error_code | readRegister (uint_least8_t reg, uint_least8_t &buf) const |
Reads a register from the device. | |
error_code | readRegister (uint_least8_t &buf) const |
Reads the current register from the device. |
Detailed Description
DS2482-800 I2C to 1-Wire Master.
Definition at line 224 of file DS2482_DS2484.hpp.
Member Enumeration Documentation
enum ErrorValue [inherited] |
Result of all 1-Wire commands.
Reimplemented from OneWireMaster.
Definition at line 45 of file DS2482_DS2484.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
Initialize hardware for use.
Definition at line 50 of file DS2482_DS2484.cpp.
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] recvBit Received data from the 1-Wire bus. afterLevel Level 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] recvBuf Buffer 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, inherited] |
Receive one byte of communication and set a new level on the 1-Wire bus.
- Parameters:
-
recvByte Buffer to receive the data from the 1-Wire bus. afterLevel Level to set the 1-Wire bus to after communication.
Reimplemented from OneWireMaster.
Definition at line 185 of file DS2482_DS2484.cpp.
error_code readRegister | ( | uint_least8_t | reg, |
uint_least8_t & | buf | ||
) | const [protected, inherited] |
Reads a register from the device.
- Parameters:
-
reg Register to read from. [out] buf Buffer to hold read data.
Definition at line 254 of file DS2482_DS2484.cpp.
error_code readRegister | ( | uint_least8_t & | buf ) | const [protected, inherited] |
Reads the current register from the device.
- Parameters:
-
[out] buf Buffer to hold read data.
Definition at line 263 of file DS2482_DS2484.cpp.
error_code reset | ( | ) | [virtual, inherited] |
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 108 of file DS2482_DS2484.cpp.
error_code selectChannel | ( | int | channel ) |
Select the active 1-Wire channel.
- Parameters:
-
channel Channel number to select from 0 to 7.
Definition at line 332 of file DS2482_DS2484.cpp.
error_code sendCommand | ( | uint_least8_t | cmd, |
uint_least8_t | param | ||
) | const [protected, inherited] |
- Note:
- Allow marking const since not public.
Definition at line 305 of file DS2482_DS2484.cpp.
error_code sendCommand | ( | uint_least8_t | cmd ) | const [protected, inherited] |
- Note:
- Allow marking const since not public.
Definition at line 301 of file DS2482_DS2484.cpp.
error_code setLevel | ( | Level | newLevel ) | [virtual, inherited] |
Set the 1-Wire bus level.
Implements OneWireMaster.
Definition at line 228 of file DS2482_DS2484.cpp.
error_code setSpeed | ( | Speed | newSpeed ) | [virtual, inherited] |
Set the 1-Wire bus communication speed.
Implements OneWireMaster.
Definition at line 215 of file DS2482_DS2484.cpp.
error_code touchBitSetLevel | ( | bool & | sendRecvBit, |
Level | afterLevel | ||
) | [virtual, inherited] |
Send and receive one bit of communication and set a new level on the 1-Wire bus.
- Parameters:
-
[in,out] sendRecvBit Input containing the bit to send and output containing the received bit. afterLevel Level to set the 1-Wire bus to after communication.
Implements OneWireMaster.
Definition at line 135 of file DS2482_DS2484.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] data Input with desired writeBit in case both read bits are zero. Output with all data fields set.
Reimplemented from OneWireMaster.
Definition at line 87 of file DS2482_DS2484.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:
-
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.
error_code 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 68 of file OneWireMaster.cpp.
error_code writeByteSetLevel | ( | uint_least8_t | sendByte, |
Level | afterLevel | ||
) | [virtual, inherited] |
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 162 of file DS2482_DS2484.cpp.
error_code writeConfig | ( | Config | config ) | [inherited] |
Write a new configuration to the device.
- Parameters:
-
[in] config New configuration to write.
Definition at line 236 of file DS2482_DS2484.cpp.
Generated on Tue Jul 12 2022 23:29:45 by 1.7.2