Class LDC

Inheritance Relationships

Base Type

Class Documentation

class BlackBox::LDC : public I2C::Device

Class for interfacing with LDC.

Public Functions

LDC(std::uint16_t address = 0x2A, i2c_port_t = 0)

Construct a new LDC object.

Parameters
  • address – Address of LDC (0x2A or 0x2B)

  • port – ESP32s i2c port on which LDC is connected

~LDC() = default
virtual void init() final

Initialize LDC.

void configure()

Configure LDC to its default operation state.

void readErrors()

Read any pending errors from LDC.

void wake()

Wake up LDC from sleep mode.

void sleep()

Put LDC into sleep mode.

void syncCache()

Synchronize (Read Only) all cached registers with their physical counterparts.

void syncChannels()

Sync channel values in cache with their physical counterparts.

void reset()

Reset LDC using SW reset.

LDCRegs::LDC16XX_dev_t registers() const

Retrieve copy of cached registers.

Returns

copy of cached registers

const LDCRegs::LDC16XX_dev_t &regs() const

Retrieve const reference to cached registers.

Returns

copy of cached registers

void writeRegisters(const LDCRegs::LDC16XX_dev_t&)

Write registers.

std::uint32_t operator[](int channel) const

Returns value on channel.

Parameters

channel(0-3) – - channel of LDC whose value is to be returned

Returns

value