DS2482-RK
Public Member Functions | Static Public Member Functions | Friends
DS2482 Class Reference

Class for DS2482 devices. More...

#include <DS2482-RK.h>

Public Member Functions

 DS2482 (TwoWire &wire, int addr)
 Constructor for DS2482 objects. Instantiate one for each DS2482-100 or DS2482-800 you have. More...
 
void setup ()
 setup call, call during setup()
 
void loop ()
 loop call, call on every time through loop()
 

Static Public Member Functions

static bool checkCRC (const uint8_t *buf, size_t bufSize)
 

Friends

class DS2482Command
 

Detailed Description

Class for DS2482 devices.

You need one instance of this class for each DS2482-100 or DS2482-800 you have on your I2C bus.

You typically only ever need to call the setup() and loop() methods.

Constructor & Destructor Documentation

◆ DS2482()

DS2482::DS2482 ( TwoWire &  wire,
int  addr 
)

Constructor for DS2482 objects. Instantiate one for each DS2482-100 or DS2482-800 you have.

Parameters
wireThe I2C interface to use, typically Wire, though it could be Wire1.
addrThe address. This is typically 0 <= addr < 8 for a DS2482-800 or 0 <= addr < 4 for a DS2482-100. If you specify a value >= 8 it's assumed to be an actual I2C addres 8 <= addr < 128.

Member Function Documentation

◆ checkCRC()

bool DS2482::checkCRC ( const uint8_t *  buf,
size_t  bufSize 
)
static

Checks the CRC of a scratchpad buffer or an I2C address

Returns
True if valid

The documentation for this class was generated from the following files: