Device interface library for multiple platforms including Mbed.

Dependents:   DeepCover Embedded Security in IoT MaximInterface MAXREFDES155#

Embed: (wiki syntax)

« Back to documentation index

DS2431 Class Reference

DS2431 Class Reference

DS2431 1024-bit 1-Wire EEPROM. More...

#include <DS2431.hpp>

Public Member Functions

MaximInterfaceDevices_EXPORT
Core::Result< void > 
readMemory (uint_least8_t beginAddress, Core::span< uint_least8_t > data) const
 Reads block of data from EEPROM memory.
MaximInterfaceDevices_EXPORT
Core::Result< void > 
writeScratchpad (uint_least8_t targetAddress, Scratchpad::const_span data)
 Writes 8 bytes to the scratchpad.
MaximInterfaceDevices_EXPORT
Core::Result< std::pair
< uint_least8_t,
Scratchpad::array > > 
readScratchpad () const
 Reads contents of scratchpad.
MaximInterfaceDevices_EXPORT
Core::Result< void > 
copyScratchpad (uint_least8_t targetAddress, uint_least8_t esByte)
 Copies contents of scratchpad to EEPROM.

Detailed Description

DS2431 1024-bit 1-Wire EEPROM.

The DS2431 is a 1024-bit, 1-Wire® EEPROM chip organized as four memory pages of 256 bits each. Data is written to an 8-byte scratchpad, verified, and then copied to the EEPROM memory. As a special feature, the four memory pages can individually be write protected or put in EPROM-emulation mode, where bits can only be changed from a 1 to a 0 state. The DS2431 communicates over the single-conductor 1-Wire bus. The communication follows the standard 1-Wire protocol. Each device has its own unalterable and unique 64-bit ROM registration number that is factory lasered into the chip. The registration number is used to address the device in a multidrop, 1-Wire net environment.

Definition at line 56 of file DS2431.hpp.


Member Function Documentation

Result< void > copyScratchpad ( uint_least8_t  targetAddress,
uint_least8_t  esByte 
)

Copies contents of scratchpad to EEPROM.

Parameters:
[in]targetAddressEEPROM memory address that scratchpad will be copied to. Must be on row boundary.
[in]esByteE/S byte from preceding Read Scratchpad command.

Definition at line 131 of file DS2431.cpp.

Result< void > readMemory ( uint_least8_t  beginAddress,
Core::span< uint_least8_t >  data 
) const

Reads block of data from EEPROM memory.

Parameters:
[in]beginAddressEEPROM memory address to start reading from.
[out]dataEEPROM data read from the device.

Definition at line 59 of file DS2431.cpp.

Result< std::pair< uint_least8_t, DS2431::Scratchpad::array > > readScratchpad (  ) const

Reads contents of scratchpad.

Returns:
E/S byte and scratchpad data.

Definition at line 99 of file DS2431.cpp.

Result< void > writeScratchpad ( uint_least8_t  targetAddress,
Scratchpad::const_span  data 
)

Writes 8 bytes to the scratchpad.

Parameters:
[in]targetAddressEEPROM memory address that this data will be copied to. Must be on row boundary.
[in]dataData to write to scratchpad.

Definition at line 74 of file DS2431.cpp.