|
int32_t | ad5791_init (struct ad5791_dev **device, struct ad5791_init_param init_param) |
| Initializes the communication with the device. More...
|
|
int32_t | ad5791_remove (struct ad5791_dev *dev) |
| Free the resources allocated by ad5791_init(). More...
|
|
int32_t | ad5791_set_register_value (struct ad5791_dev *dev, uint8_t register_address, uint32_t register_value) |
| Writes data into a register. More...
|
|
int32_t | ad5791_get_register_value (struct ad5791_dev *dev, uint8_t register_address, uint32_t *value) |
| Reads the value of a register. More...
|
|
int32_t | ad5791_dac_ouput_state (struct ad5791_dev *dev, uint8_t state) |
| Sets the DAC output in one of the three states. More...
|
|
int32_t | ad5791_set_dac_value (struct ad5791_dev *dev, uint32_t value) |
| Writes to the DAC register. More...
|
|
int32_t | ad5791_soft_instruction (struct ad5791_dev *dev, uint8_t instruction_bit) |
| Asserts RESET, CLR or LDAC in a software manner. More...
|
|
int32_t | ad5791_setup (struct ad5791_dev *dev, uint32_t setup_word) |
| Configures the output amplifier, DAC coding, SDO state and the linearity error compensation. More...
|
|
int | ad5791_spi_write_mask (struct ad5791_dev *dev, uint8_t register_address, uint32_t mask, uint32_t value) |
| SPI write to device using a mask. More...
|
|
int | ad5791_set_lin_comp (struct ad5791_dev *dev, enum ad5791_lin_comp_select v_span) |
| Set Linearity error compensation based on the reference voltage span. More...
|
|
int | ad5791_ldac_trigger (struct ad5791_dev *dev) |
| Trigger LDAC. More...
|
|
int | ad5791_clear_async (struct ad5791_dev *dev) |
| Clear DAC channel output with the clearcode. More...
|
|
Implementation of AD5791 Driver.
- Author
- DNechita (Dan.N.nosp@m.echi.nosp@m.ta@an.nosp@m.alog.nosp@m..com)
Copyright 2013(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.