Header file of LTC2686/8 Driver. More...
Go to the source code of this file.
Classes | |
struct | ltc268x_span_tbl |
struct | ltc268x_dev |
struct | ltc268x_init_param |
Functions | |
int32_t | ltc268x_set_pwr_dac (struct ltc268x_dev *dev, uint16_t setting) |
int32_t | ltc268x_set_dither_toggle (struct ltc268x_dev *dev, uint16_t setting) |
int32_t | ltc268x_set_dither_mode (struct ltc268x_dev *dev, uint8_t channel, bool en) |
int32_t | ltc268x_set_span (struct ltc268x_dev *dev, uint8_t channel, enum ltc268x_voltage_range range) |
int32_t | ltc268x_set_dither_phase (struct ltc268x_dev *dev, uint8_t channel, enum ltc268x_dither_phase phase) |
int32_t | ltc268x_set_dither_period (struct ltc268x_dev *dev, uint8_t channel, enum ltc268x_dither_period period) |
int32_t | ltc268x_select_tg_dith_clk (struct ltc268x_dev *dev, uint8_t channel, enum ltc268x_clk_input clk_input) |
int32_t | ltc268x_select_reg (struct ltc268x_dev *dev, uint8_t channel, enum ltc268x_a_b_register sel_reg) |
int32_t | ltc268x_software_reset (struct ltc268x_dev *dev) |
int32_t | ltc268x_set_voltage (struct ltc268x_dev *dev, uint8_t channel, float voltage) |
int32_t | ltc268x_software_toggle (struct ltc268x_dev *dev, uint8_t channel) |
int32_t | ltc268x_init (struct ltc268x_dev **device, struct ltc268x_init_param init_param) |
int32_t | ltc268x_remove (struct ltc268x_dev *dev) |
Free the resources allocated by ltc268x_init(). | |
Header file of LTC2686/8 Driver.
Copyright 2021(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 LTC268X_CH_DIT_PER | ( | x | ) |
#define LTC268X_CH_DIT_PER_MSK NO_OS_GENMASK(8, 6) |
#define LTC268X_CH_DIT_PH | ( | x | ) |
#define LTC268X_CH_DIT_PH_MSK NO_OS_GENMASK(10, 9) |
#define LTC268X_CH_MODE NO_OS_BIT(11) |
#define LTC268X_CH_SPAN | ( | x | ) |
#define LTC268X_CH_SPAN_MSK NO_OS_GENMASK(3, 0) |
#define LTC268X_CH_TD_SEL | ( | x | ) |
#define LTC268X_CH_TD_SEL_MSK NO_OS_GENMASK(5, 4) |
#define LTC268X_CHANNEL_SEL | ( | x, | |
id ) |
#define LTC268X_CMD_A_B_SELECT_REG 0x72 |
#define LTC268X_CMD_CH_CODE | ( | x, | |
id ) |
#define LTC268X_CMD_CH_CODE_UPDATE | ( | x, | |
id ) |
#define LTC268X_CMD_CH_CODE_UPDATE_ALL | ( | x, | |
id ) |
#define LTC268X_CMD_CH_GAIN | ( | x, | |
id ) |
#define LTC268X_CMD_CH_OFFSET | ( | x, | |
id ) |
#define LTC268X_CMD_CH_SETTING | ( | x, | |
id ) |
#define LTC268X_CMD_CH_UPDATE | ( | x, | |
id ) |
#define LTC268X_CMD_CODE_ALL 0x78 |
#define LTC268X_CMD_CODE_UPDATE_ALL 0x79 |
#define LTC268X_CMD_CONFIG_REG 0x70 |
#define LTC268X_CMD_FAULT_REG 0x76 |
#define LTC268X_CMD_MUX_CTRL_REG 0x75 |
#define LTC268X_CMD_NOOP 0xFF |
#define LTC268X_CMD_POWERDOWN_REG 0x71 |
#define LTC268X_CMD_SETTING_ALL 0x7A |
#define LTC268X_CMD_SETTING_UPDATE_ALL 0x7B |
#define LTC268X_CMD_SW_TOGGLE_REG 0x73 |
#define LTC268X_CMD_TOGGLE_DITHER_EN_REG 0x74 |
#define LTC268X_CMD_UPDATE_ALL 0x7C |
#define LTC268X_CONFIG_RST NO_OS_BIT(15) |
#define LTC268X_DITH_EN | ( | x | ) |
#define LTC268X_PWDN | ( | x | ) |
#define LTC268X_READ_OPERATION 0x80 |
enum ltc268x_a_b_register |
enum ltc268x_clk_input |
enum ltc268x_device_id |
enum ltc268x_dither_phase |
int32_t ltc268x_init | ( | struct ltc268x_dev ** | device, |
struct ltc268x_init_param | init_param ) |
Initialize the device.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
int32_t ltc268x_remove | ( | struct ltc268x_dev * | dev | ) |
Free the resources allocated by ltc268x_init().
dev | - The device structure. |
int32_t ltc268x_select_reg | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
enum ltc268x_a_b_register | sel_reg ) |
Select register A or B for value.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
sel_reg | - Select register A or B to store DAC output value. |
int32_t ltc268x_select_tg_dith_clk | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
enum ltc268x_clk_input | clk_input ) |
Select dither/toggle clock input.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
clk_input | - Select the source for the clock input. |
int32_t ltc268x_set_dither_mode | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
bool | en ) |
Set channel to dither mode.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
en | - enable or disable dither mode |
int32_t ltc268x_set_dither_period | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
enum ltc268x_dither_period | period ) |
Set channel dither period.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
period | - Dither period. |
int32_t ltc268x_set_dither_phase | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
enum ltc268x_dither_phase | phase ) |
Set channel dither phase.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
phase | - Dither phase. |
int32_t ltc268x_set_dither_toggle | ( | struct ltc268x_dev * | dev, |
uint16_t | setting ) |
Enable dither/toggle for selected channels.
dev | - The device structure. |
setting | - The setting. Accepted values: LTC268X_DITH_EN(x) | LTC268X_DITH_EN(y) | ... |
int32_t ltc268x_set_pwr_dac | ( | struct ltc268x_dev * | dev, |
uint16_t | setting ) |
Power down the selected channels.
dev | - The device structure. |
setting | - The setting. Accepted values: LTC268X_PWDN(x) | LTC268X_PWDN(y) | ... |
int32_t ltc268x_set_span | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
enum ltc268x_voltage_range | range ) |
Set channel span.
dev | - The device structure. |
channel | - The channel for which to change the mode. |
range | - Voltage range. |
int32_t ltc268x_set_voltage | ( | struct ltc268x_dev * | dev, |
uint8_t | channel, | ||
float | voltage ) |
Sets the output voltage of a channel.
dev | - The device structure. |
channel | - Channel option. |
voltage | - Value to be outputted by the DAC(Volts). |
int32_t ltc268x_software_reset | ( | struct ltc268x_dev * | dev | ) |
Software reset the device.
dev | - The device structure. |
int32_t ltc268x_software_toggle | ( | struct ltc268x_dev * | dev, |
uint8_t | channel ) |
Toggle the software source for dither/toggle.
dev | - The device structure. |
channel | - The channel for which to change the mode. |