25 typedef unsigned char byte;
40 uint8_t sync_pin_, spi_bus_config_pin_, ldac_pin_, spi_mode_;
41 uint8_t clock_divider_;
43 uint8_t bit_resolution_;
63 DacSpi(uint8_t sync_pin, uint8_t spi_bus_config_pin,
64 uint8_t ldac_pin, uint8_t bit_resolution,
65 uint8_t clock_divider=4, BitOrder bit_order=MSBFIRST,
66 uint8_t spi_mode=SPI_MODE1);
87 double SetVoltage(uint8_t channel,
double voltage,
88 bool update_outputs =
true);
double SetVoltage(uint8_t channel, double voltage, bool update_outputs=true)
Definition: dac.cpp:66
uint8_t Initialize(void)
Definition: dac.cpp:46
void UpdateAnalogOutputs(void)
Definition: dac.cpp:62
uint8_t Begin(void)
Definition: dac.cpp:31
virtual spi_utils::Message InitializeMessage(void)
Definition: dac.h:118
virtual spi_utils::Message SetVoltageMessage(uint8_t channel, double voltage)
Definition: dac.h:114
virtual double BytesToVoltage(spi_utils::Message message)
Definition: dac.h:108
double GetVoltage(uint8_t channel)
Definition: dac.cpp:87