KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
Driver of the LTC2631 DAC as found on the power board. More...
#include "drv/wb/i2c.h"
Go to the source code of this file.
Macros | |
#define | LTC2631_MAX 0xFFFF |
Enumerations | |
enum | LTC2631Oper { ltc2631OperUpdate, ltc2631OperPowerDown, ltc2631OperSelIntRef, ltc2631OperSelExtRef } |
Functions | |
bool | ltc2631Write (I2C_Device *dev, uint8_t addr, uint16_t value, bool update) |
Sets the DAC value on the input register. More... | |
bool | ltc2631Operation (I2C_Device *dev, uint8_t addr, LTC2631Oper oper) |
Executes a DAC operation. More... | |
Driver of the LTC2631 DAC as found on the power board.
Definition in file ltc2631.h.
enum LTC2631Oper |
bool ltc2631Operation | ( | I2C_Device * | dev, |
uint8_t | addr, | ||
LTC2631Oper | oper | ||
) |
bool ltc2631Write | ( | I2C_Device * | dev, |
uint8_t | addr, | ||
uint16_t | value, | ||
bool | update | ||
) |
Sets the DAC value on the input register.
When update is false, the output voltage is not immediately adjusted to the value of the input register. To apply the set input value invoke the ltc2631Operation with the ltc2631OperUpdate operation.
dev | The I2C device. |
addr | The I2C address |
value | The DAC value to set |
update | Immediately update |
true | Success |
false | Failure, see err module for error. |