TLV320DAC3100.Regs (tlv320dac3100 v0.1.0)

Copy Markdown View Source

Low-level register I2C helpers and bit-packing operations for the TLV320DAC3100.

Summary

Functions

Assembles Headphone PGA gain and mute control byte (Page 1, Registers 40 & 41 / 0x28 & 0x29).

Assembles HP driver power control configuration byte (Page 1, Register 31 / 0x1F).

Reads a config byte from a register on a specific page of the TLV320DAC3100 over I2C.

Assembles Speaker PGA gain and mute control byte (Page 1, Register 42 / 0x2A).

Iterates over a list of {page, reg, val} tuples and writes them sequentially over I2C.

Writes a config byte to a register on a specific page of the TLV320DAC3100 over I2C.

Functions

hp_driver_val(gain, muted?)

Assembles Headphone PGA gain and mute control byte (Page 1, Registers 40 & 41 / 0x28 & 0x29).

hp_drivers_val(left_powered, right_powered, common \\ 2, power_down_on_scd \\ false)

Assembles HP driver power control configuration byte (Page 1, Register 31 / 0x1F).

read_reg(bus_ref, address, page, reg)

Reads a config byte from a register on a specific page of the TLV320DAC3100 over I2C.

spk_driver_val(gain, muted?)

Assembles Speaker PGA gain and mute control byte (Page 1, Register 42 / 0x2A).

write_configs(bus_ref, address, configs)

Iterates over a list of {page, reg, val} tuples and writes them sequentially over I2C.

write_reg(bus_ref, address, page, reg, val)

Writes a config byte to a register on a specific page of the TLV320DAC3100 over I2C.