no-OS
|
Header file of AD5446 Driver. This driver supporting the following devices: AD5553, AD5543, AD5542A, AD5541A, AD5512A, AD5453, AD5452, AD5451, AD5450, AD5446, AD5444. More...
Go to the source code of this file.
Classes | |
struct | ad5446_chip_info |
struct | ad5446_dev |
struct | ad5446_init_param |
Macros | |
#define | AD5446_CTRL_LOAD_UPDATE 0x0 |
#define | AD5446_CTRL_ACTIVE_POSEDGE 0x3 |
#define | AD5446_LDAC_OUT |
#define | AD5446_LDAC_LOW |
#define | AD5446_LDAC_HIGH |
#define | AD5446_CLR_OUT |
#define | AD5446_CLR_LOW |
#define | AD5446_CLR_HIGH |
Enumerations | |
enum | active_clk_t { negedge, posedge } |
enum | bool_t { false, true, false, true, false, true } |
enum | vout_type_t { unipolar, unipolar_inv, bipolar } |
enum | ad5446_type_t { ID_AD5600, ID_AD5553, ID_AD5543, ID_AD5542A, ID_AD5541A, ID_AD5512A, ID_AD5453, ID_AD5452, ID_AD5451, ID_AD5450, ID_AD5446, ID_AD5444 } |
Functions | |
int8_t | ad5446_init (struct ad5446_dev **device, struct ad5446_init_param init_param) |
Initialize SPI and Initial Values for AD5446 Board. More... | |
int32_t | ad5446_remove (struct ad5446_dev *dev) |
Free the resources allocated by ad5446_init(). More... | |
void | ad5446_set_register (struct ad5446_dev *dev, uint8_t command, uint16_t data) |
Writes to input register via SPI. More... | |
float | ad5446_set_voltage (struct ad5446_dev *dev, float voltage, float vref, enum vout_type_t vout_type) |
Sets the output voltage. More... | |
Header file of AD5446 Driver. This driver supporting the following devices: AD5553, AD5543, AD5542A, AD5541A, AD5512A, AD5453, AD5452, AD5451, AD5450, AD5446, AD5444.
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:
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.
#define AD5446_CLR_HIGH |
#define AD5446_CLR_LOW |
#define AD5446_CLR_OUT |
#define AD5446_CTRL_ACTIVE_POSEDGE 0x3 |
#define AD5446_CTRL_LOAD_UPDATE 0x0 |
#define AD5446_LDAC_HIGH |
#define AD5446_LDAC_LOW |
#define AD5446_LDAC_OUT |
enum active_clk_t |
enum ad5446_type_t |
enum bool_t |
enum vout_type_t |
int8_t ad5446_init | ( | struct ad5446_dev ** | device, |
struct ad5446_init_param | init_param | ||
) |
Initialize SPI and Initial Values for AD5446 Board.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int32_t ad5446_remove | ( | struct ad5446_dev * | dev | ) |
Free the resources allocated by ad5446_init().
dev | - The device structure. |
void ad5446_set_register | ( | struct ad5446_dev * | dev, |
uint8_t | command, | ||
uint16_t | data | ||
) |
Writes to input register via SPI.
dev | - The device structure. |
command | - Command to be transmitted to the device. |
data | - Data to be written in input register. |
float ad5446_set_voltage | ( | struct ad5446_dev * | dev, |
float | voltage, | ||
float | vref, | ||
enum vout_type_t | vout_type | ||
) |
Sets the output voltage.
dev | - The device structure. |
voltage | - The voltage value in volts |
vref | - The voltage reference used by the device in volts. |
vout_type | - Voltage output type: unipolar/unipolar_inv/bipolar |