no-OS
ltc2672.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef __LTC2672_H__
41 #define __LTC2672_H__
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include <stdbool.h>
48 #include "no_os_spi.h"
49 #include "no_os_error.h"
50 #include "no_os_units.h"
51 
52 /******************************************************************************/
53 /********************** Macros and Constants Definitions **********************/
54 /******************************************************************************/
55 /* LTC2672 Masks */
56 #define LTC2672_16_DONT_CARE 0xFFF0
57 #define LTC2672_MUX_DONT_CARE 0xFFFE0
58 #define LTC2672_DUMMY 0xFFFF
59 #define LTC2672_FAULT_REG_MASK 0xFF0000
60 
61 /* LTC2672 Constants */
62 #define LTC2672_BASE_CURRENT 3.125 // base current in mA
63 #define LTC2672_VMINUS_FIXED_CURRENT -80 // Fixed V- Current as per data sheet
64 #define LTC2672_OFF_CURRENT 0
65 #define LTC2672_300MA_CURRENT 300
66 #define LTC2672_16BIT_RESO 65535
67 #define LTC2672_12BIT_RESO 4095
68 #define LTC2672_TOTAL_CHANNELS 5
69 #define LTC2672_MAX_CONFIG_MASK 15
70 #define LTC2672_MAX_TOGGLE_MASK 31
71 #define LTC2672_BIT_SHIFT_12BIT 4
72 #define LTC2672_NUM_MUX_SELECTS 22
73 #define LTC2672_NUM_CURRENT_SPANS 10
74 #define LTC2672_NUM_FAULTS 7
75 
93 };
94 
95 /* LTC2672 Command Generation */
96 #define LTC2672_COMMAND32_GENERATE(comm, add, dat) \
97  (0xFF << 24) | (comm << 20) | (add << 16) | (dat)
98 
99 #define LTC2672_COMMAND24_GENERATE(comm, add, dat) \
100  (comm << 20) | (add << 16) | (dat)
101 
102 #define LTC2672_SPAN_SET(span_code) LTC2672_16_DONT_CARE | span_code
103 
104 #define LTC2672_MUX_SET(mux_code) LTC2672_MUX_DONT_CARE | mux_code
105 
106 #define LTC2672_MUX32_GENERATE(comm, dat) \
107  (0xFF << 24) | (comm << 20) | (dat)
108 
109 #define LTC2672_MUX24_GENERATE(comm, dat) \
110  (comm << 20) | (dat)
111 
112 /* Device Family */
116 };
117 
118 /* DAC Channels */
125 };
126 
127 /* Output Range */
129  LTC2672_OFF, // Off mode
130  LTC2672_50VREF, // 3.125mA
131  LTC2672_100VREF, // 6.25mA
132  LTC2672_200VREF, //12.5mA
137  LTC2672_VMINUS_VREF, // Fixed, -80mA
138  LTC2672_4800VREF = 0XF // 300mA
139 };
140 
141 /* Multiplexer Command Codes */
165 };
166 
167 /* Faults */
169  LTC2672_OPEN_OUT0, // Open circuit CH0
170  LTC2672_OPEN_OUT1, // Open circuit CH0
171  LTC2672_OPEN_OUT2, // Open circuit CH0
172  LTC2672_OPEN_OUT3, // Open circuit CH0
173  LTC2672_OPEN_OUT4, // Open circuit CH0
174  LTC2672_OVER_TEMP, // Over-temperature (T > 175 deg C)
175  LTC2672_UNUSED, // Unused fault register bit
176  LTC2672_INV_LENGTH, // Invalid SPI Length (len != 24 or 32 * n)
177 };
178 
183 struct ltc2672_dev {
184  /* SPI descriptor */
186  /* Device Variant indicator */
188  /* DAC Channel Spans */
190  /* Maximum Current Per Channel in uA */
192  /* Previous command tracker */
193  uint32_t prev_command;
194  /* Global toggle bit flag */
196 };
197 
203  /* SPI descriptor */
205  /* Device Variant indicator */
207 };
208 
210 int ltc2672_init(struct ltc2672_dev **, struct ltc2672_init_param *);
211 
213 int ltc2672_remove(struct ltc2672_dev *);
214 
216 int ltc2672_transaction(struct ltc2672_dev *device, uint32_t, bool);
217 
219 uint32_t ltc2672_current_to_code(struct ltc2672_dev *device, uint32_t,
220  enum ltc2672_dac_ch);
221 
223 int ltc2672_set_code_channel(struct ltc2672_dev *device, uint16_t code,
224  enum ltc2672_dac_ch out_ch);
225 
227 int ltc2672_set_current_channel(struct ltc2672_dev *, uint32_t,
228  enum ltc2672_dac_ch);
229 
231 int ltc2672_set_code_all_channels(struct ltc2672_dev *device, uint16_t code);
232 
234 int ltc2672_set_current_all_channels(struct ltc2672_dev *, uint32_t);
235 
238  enum ltc2672_dac_ch);
239 
242 
245 
248 
251 
254 
257  uint32_t, uint32_t);
258 
260 int ltc2672_enable_toggle_channel(struct ltc2672_dev *, uint32_t);
261 
263 int ltc2672_global_toggle(struct ltc2672_dev *, bool);
264 
266 int ltc2672_config_command(struct ltc2672_dev *, uint8_t);
267 
268 #endif // __LTC2672_H__
LTC2672_NO_OP
@ LTC2672_NO_OP
Definition: ltc2672.h:92
LTC2672_100VREF
@ LTC2672_100VREF
Definition: ltc2672.h:131
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:122
ltc2672_enable_toggle_channel
int ltc2672_enable_toggle_channel(struct ltc2672_dev *, uint32_t)
enables or disables selected channel/s for toggling
Definition: ltc2672.c:538
iio_trigger.h
Header file for iio_trigger.
LTC2672_MUX_VOUT1
@ LTC2672_MUX_VOUT1
Definition: ltc2672.h:161
LTC2672_MAX_CONFIG_MASK
#define LTC2672_MAX_CONFIG_MASK
Definition: ltc2672.h:69
ltc2672_set_span_all_channels
int ltc2672_set_span_all_channels(struct ltc2672_dev *device, enum ltc2672_out_range ch_span)
sets the same output span for all channels
Definition: ltc2672.c:339
LTC2672_MUX_VDD2
@ LTC2672_MUX_VDD2
Definition: ltc2672.h:155
iio_dac_demo.h
Header file of DAC Demo iio.
ltc2672_commands
ltc2672_commands
Definition: ltc2672.h:76
LTC2672_BIT_SHIFT_12BIT
#define LTC2672_BIT_SHIFT_12BIT
Definition: ltc2672.h:71
ltc2672_config_command
int ltc2672_config_command(struct ltc2672_dev *device, uint8_t mask)
configures the fault detection bits
Definition: ltc2672.c:574
ltc2672_monitor_mux
int ltc2672_monitor_mux(struct ltc2672_dev *device, enum ltc2672_mux_commands mux_comm)
configures mux output depending on target measurement
Definition: ltc2672.c:449
ltc2672_remove
int ltc2672_remove(struct ltc2672_dev *device)
Remove resources allocated by the init function.
Definition: ltc2672.c:94
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:165
LTC2672_CODE_TO_CHANNEL_X_PWRUP_UPD_CHANNEL_ALL
@ LTC2672_CODE_TO_CHANNEL_X_PWRUP_UPD_CHANNEL_ALL
Definition: ltc2672.h:79
LTC2672_SPAN_TO_CHANNEL_ALL
@ LTC2672_SPAN_TO_CHANNEL_ALL
Definition: ltc2672.h:91
LTC2672_MUX_IOUT4
@ LTC2672_MUX_IOUT4
Definition: ltc2672.h:148
no_os_spi.h
Header file of SPI Interface.
LTC2672_PWRDWN_DEV
@ LTC2672_PWRDWN_DEV
Definition: ltc2672.h:82
ltc2672_set_span_all_channels
int ltc2672_set_span_all_channels(struct ltc2672_dev *, enum ltc2672_out_range)
sets the same output span for all channels
Definition: ltc2672.c:339
ltc2672_chip_power_down
int ltc2672_chip_power_down(struct ltc2672_dev *device)
power down ltc2672
Definition: ltc2672.c:390
ltc2672_out_range
ltc2672_out_range
Definition: ltc2672.h:128
LTC2672_MAX_TOGGLE_MASK
#define LTC2672_MAX_TOGGLE_MASK
Definition: ltc2672.h:70
LTC2672_MUX_VDD4
@ LTC2672_MUX_VDD4
Definition: ltc2672.h:157
ltc2672_global_toggle
int ltc2672_global_toggle(struct ltc2672_dev *, bool)
enables or disables global toggle bit
Definition: ltc2672.c:556
LTC2672_OVER_TEMP
@ LTC2672_OVER_TEMP
Definition: ltc2672.h:174
no_os_units.h
Header file of Units.
ltc2672_power_down_channel
int ltc2672_power_down_channel(struct ltc2672_dev *device, enum ltc2672_dac_ch out_ch)
power down a channel
Definition: ltc2672.c:406
LTC2672_DAC4
@ LTC2672_DAC4
Definition: ltc2672.h:124
LTC2672_MUX_VOUT4
@ LTC2672_MUX_VOUT4
Definition: ltc2672.h:164
LTC2672_VMINUS_FIXED_CURRENT
#define LTC2672_VMINUS_FIXED_CURRENT
Definition: ltc2672.h:63
iio_trig_disable
int iio_trig_disable(void *trig)
Disable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:133
ltc2672_set_code_all_channels
int ltc2672_set_code_all_channels(struct ltc2672_dev *device, uint16_t code)
sets the same dac code for all channels
Definition: ltc2672.c:228
LTC2672_50VREF
@ LTC2672_50VREF
Definition: ltc2672.h:130
LTC2672_MUX_SET
#define LTC2672_MUX_SET(mux_code)
Definition: ltc2672.h:104
LTC2672_MUX_GND
@ LTC2672_MUX_GND
Definition: ltc2672.h:159
LTC2672_OFF
@ LTC2672_OFF
Definition: ltc2672.h:129
LTC2672_TOGGLE_GLBL
@ LTC2672_TOGGLE_GLBL
Definition: ltc2672.h:90
LTC2672_PWRUP_UPD_CHANNEL_X
@ LTC2672_PWRUP_UPD_CHANNEL_X
Definition: ltc2672.h:78
LTC2672_SPAN_TO_CHANNEL_X
@ LTC2672_SPAN_TO_CHANNEL_X
Definition: ltc2672.h:83
LTC2672_16
@ LTC2672_16
Definition: ltc2672.h:115
device
Definition: ad9361_util.h:75
ltc2672_power_down_all_channels
int ltc2672_power_down_all_channels(struct ltc2672_dev *)
power down ALL channels
Definition: ltc2672.c:425
LTC2672_DAC3
@ LTC2672_DAC3
Definition: ltc2672.h:123
ltc2672_device_id
ltc2672_device_id
Definition: ltc2672.h:113
LTC2672_400VREF
@ LTC2672_400VREF
Definition: ltc2672.h:133
LTC2672_MUX_IOUT1
@ LTC2672_MUX_IOUT1
Definition: ltc2672.h:145
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:60
ltc2672_monitor_mux
int ltc2672_monitor_mux(struct ltc2672_dev *, enum ltc2672_mux_commands)
configures mux output depending on target measurement
Definition: ltc2672.c:449
LTC2672_MUX_VDD3
@ LTC2672_MUX_VDD3
Definition: ltc2672.h:156
LTC2672_CODE_TO_CHANNEL_ALL
@ LTC2672_CODE_TO_CHANNEL_ALL
Definition: ltc2672.h:85
dac_iio_sw_trig_desc
struct iio_trigger dac_iio_sw_trig_desc
Definition: iio_dac_demo_trig.c:61
LTC2672_200VREF
@ LTC2672_200VREF
Definition: ltc2672.h:132
LTC2672_MUC_VCC
@ LTC2672_MUC_VCC
Definition: ltc2672.h:149
LTC2672_800VREF
@ LTC2672_800VREF
Definition: ltc2672.h:134
iio_sw_trig_handler
int iio_sw_trig_handler(void *trig, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for trigger_now attribute.
Definition: iio_trigger.c:214
LTC2672_VMINUS_VREF
@ LTC2672_VMINUS_VREF
Definition: ltc2672.h:137
ltc2672_power_down_all_channels
int ltc2672_power_down_all_channels(struct ltc2672_dev *device)
power down ALL channels
Definition: ltc2672.c:425
ltc2672_config_command
int ltc2672_config_command(struct ltc2672_dev *, uint8_t)
configures the fault detection bits
Definition: ltc2672.c:574
LTC2672_MUX24_GENERATE
#define LTC2672_MUX24_GENERATE(comm, dat)
Definition: ltc2672.h:109
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
LTC2672_DUMMY
#define LTC2672_DUMMY
Definition: ltc2672.h:58
ltc2672_set_current_all_channels
int ltc2672_set_current_all_channels(struct ltc2672_dev *device, uint32_t current)
sets the same current for all channels
Definition: ltc2672.c:260
ltc2672_set_current_all_channels
int ltc2672_set_current_all_channels(struct ltc2672_dev *, uint32_t)
sets the same current for all channels
Definition: ltc2672.c:260
iio_attribute::name
const char * name
Definition: iio_types.h:137
LTC2672_OPEN_OUT3
@ LTC2672_OPEN_OUT3
Definition: ltc2672.h:172
ltc2672_set_code_all_channels
int ltc2672_set_code_all_channels(struct ltc2672_dev *device, uint16_t code)
sets the same dac code for all channels
Definition: ltc2672.c:228
LTC2672_DAC2
@ LTC2672_DAC2
Definition: ltc2672.h:122
ltc2672_init
int ltc2672_init(struct ltc2672_dev **device, struct ltc2672_init_param *init_param)
Device and communication init function.
Definition: ltc2672.c:64
LTC2672_PWRUP_UPD_CHANNEL_ALL
@ LTC2672_PWRUP_UPD_CHANNEL_ALL
Definition: ltc2672.h:86
ltc2672_enable_toggle_channel
int ltc2672_enable_toggle_channel(struct ltc2672_dev *device, uint32_t mask)
enables or disables selected channel/s for toggling
Definition: ltc2672.c:538
LTC2672_MON_MUX
@ LTC2672_MON_MUX
Definition: ltc2672.h:88
LTC2672_MUX_IOUT2
@ LTC2672_MUX_IOUT2
Definition: ltc2672.h:146
LTC2672_MUX_VOUT3
@ LTC2672_MUX_VOUT3
Definition: ltc2672.h:163
ltc2672_transaction
int ltc2672_transaction(struct ltc2672_dev *device, uint32_t, bool)
Write raw register value.
Definition: ltc2672.c:115
LTC2672_300MA_CURRENT
#define LTC2672_300MA_CURRENT
Definition: ltc2672.h:65
iio_trig_enable
int iio_trig_enable(void *trig)
Enable system interrupt which is linked to the given trigger.
Definition: iio_trigger.c:116
LTC2672_CODE_PWRUP_UPD_CHANNEL_ALL
@ LTC2672_CODE_PWRUP_UPD_CHANNEL_ALL
Definition: ltc2672.h:87
ltc2672_set_current_channel
int ltc2672_set_current_channel(struct ltc2672_dev *device, uint32_t current, enum ltc2672_dac_ch out_ch)
set the current for a selected DAC channel
Definition: ltc2672.c:207
LTC2672_OPEN_OUT2
@ LTC2672_OPEN_OUT2
Definition: ltc2672.h:171
LTC2672_MUX_DISABLED
@ LTC2672_MUX_DISABLED
Definition: ltc2672.h:143
LTC2672_1600VREF
@ LTC2672_1600VREF
Definition: ltc2672.h:135
ltc2672_dev
Structure holding ltc2672 descriptor.
Definition: ltc2672.h:183
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:135
ltc2672_transaction
int ltc2672_transaction(struct ltc2672_dev *device, uint32_t comm, bool is_32)
Write raw register value.
Definition: ltc2672.c:115
ltc2672_set_span_channel
int ltc2672_set_span_channel(struct ltc2672_dev *device, enum ltc2672_out_range ch_span, enum ltc2672_dac_ch out_ch)
sets output span for channel
Definition: ltc2672.c:288
LTC2672_BASE_CURRENT
#define LTC2672_BASE_CURRENT
Definition: ltc2672.h:62
LTC2672_UNUSED
@ LTC2672_UNUSED
Definition: ltc2672.h:175
LTC2672_DAC1
@ LTC2672_DAC1
Definition: ltc2672.h:121
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
ltc2672_chip_power_down
int ltc2672_chip_power_down(struct ltc2672_dev *)
power down ltc2672
Definition: ltc2672.c:390
LTC2672_OPEN_OUT1
@ LTC2672_OPEN_OUT1
Definition: ltc2672.h:170
ltc2672_dac_ch
ltc2672_dac_ch
Definition: ltc2672.h:119
ltc2672_set_code_channel
int ltc2672_set_code_channel(struct ltc2672_dev *device, uint16_t code, enum ltc2672_dac_ch out_ch)
sets the dac code for channel
Definition: ltc2672.c:171
LTC2672_3200VREF
@ LTC2672_3200VREF
Definition: ltc2672.h:136
ltc2672_mux_commands
ltc2672_mux_commands
Definition: ltc2672.h:142
LTC2672_INV_LENGTH
@ LTC2672_INV_LENGTH
Definition: ltc2672.h:176
ltc2672_init
int ltc2672_init(struct ltc2672_dev **, struct ltc2672_init_param *)
Device and communication init function.
Definition: ltc2672.c:64
ltc2672_init_param
Structure holding the parameters for ltc2672 initialization.
Definition: ltc2672.h:202
dac_iio_timer_trig_desc
struct iio_trigger dac_iio_timer_trig_desc
Definition: iio_dac_demo_trig.c:67
ltc2672_dev::max_currents
uint32_t max_currents[LTC2672_TOTAL_CHANNELS]
Definition: ltc2672.h:191
LTC2672_OPEN_OUT4
@ LTC2672_OPEN_OUT4
Definition: ltc2672.h:173
LTC2672_12
@ LTC2672_12
Definition: ltc2672.h:114
ltc2672_set_code_channel
int ltc2672_set_code_channel(struct ltc2672_dev *device, uint16_t code, enum ltc2672_dac_ch out_ch)
sets the dac code for channel
Definition: ltc2672.c:171
LTC2672_MUX_DIE_TEMP
@ LTC2672_MUX_DIE_TEMP
Definition: ltc2672.h:152
LTC2672_OFF_CURRENT
#define LTC2672_OFF_CURRENT
Definition: ltc2672.h:64
LTC2672_TOGGLE_SEL
@ LTC2672_TOGGLE_SEL
Definition: ltc2672.h:89
LTC2672_OPEN_OUT0
@ LTC2672_OPEN_OUT0
Definition: ltc2672.h:169
ltc2672_dev::id
enum ltc2672_device_id id
Definition: ltc2672.h:187
ltc2672.h
Header file of ltc2672 Driver.
ltc2672_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: ltc2672.h:204
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
ltc2672_init_param::id
enum ltc2672_device_id id
Definition: ltc2672.h:206
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
LTC2672_MUX_VOUT2
@ LTC2672_MUX_VOUT2
Definition: ltc2672.h:162
MICROAMPER_PER_MILLIAMPER
#define MICROAMPER_PER_MILLIAMPER
Definition: no_os_units.h:69
ltc2672_set_current_channel
int ltc2672_set_current_channel(struct ltc2672_dev *, uint32_t, enum ltc2672_dac_ch)
set the current for a selected DAC channel
Definition: ltc2672.c:207
iio_trigger
Definition: iio_types.h:237
LTC2672_SPAN_SET
#define LTC2672_SPAN_SET(span_code)
Definition: ltc2672.h:102
ltc2672_set_span_channel
int ltc2672_set_span_channel(struct ltc2672_dev *, enum ltc2672_out_range, enum ltc2672_dac_ch)
sets output span for channel
Definition: ltc2672.c:288
LTC2672_CODE_PWRUP_UPD_CHANNEL_X
@ LTC2672_CODE_PWRUP_UPD_CHANNEL_X
Definition: ltc2672.h:80
LTC2672_MUX_VOUT0
@ LTC2672_MUX_VOUT0
Definition: ltc2672.h:160
LTC2672_MUX_IOUT0
@ LTC2672_MUX_IOUT0
Definition: ltc2672.h:144
LTC2672_CODE_TO_CHANNEL_X
@ LTC2672_CODE_TO_CHANNEL_X
Definition: ltc2672.h:77
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
LTC2672_TOTAL_CHANNELS
#define LTC2672_TOTAL_CHANNELS
Definition: ltc2672.h:68
ltc2672_dev::out_spans
enum ltc2672_out_range out_spans[LTC2672_TOTAL_CHANNELS]
Definition: ltc2672.h:189
LTC2672_4800VREF
@ LTC2672_4800VREF
Definition: ltc2672.h:138
LTC2672_16BIT_RESO
#define LTC2672_16BIT_RESO
Definition: ltc2672.h:66
ltc2672_setup_toggle_channel
int ltc2672_setup_toggle_channel(struct ltc2672_dev *device, enum ltc2672_dac_ch out_ch, uint32_t current_reg_a, uint32_t current_reg_b)
setup toggle parameters for a channel
Definition: ltc2672.c:473
LTC2672_PWRDWN_CHANNEL_X
@ LTC2672_PWRDWN_CHANNEL_X
Definition: ltc2672.h:81
LTC2672_MUX_VDD1
@ LTC2672_MUX_VDD1
Definition: ltc2672.h:154
LTC2672_CNFG_CMD
@ LTC2672_CNFG_CMD
Definition: ltc2672.h:84
ltc2672_dev::global_toggle
bool global_toggle
Definition: ltc2672.h:195
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:122
LTC2672_12BIT_RESO
#define LTC2672_12BIT_RESO
Definition: ltc2672.h:67
ltc2672_current_to_code
uint32_t ltc2672_current_to_code(struct ltc2672_dev *device, uint32_t, enum ltc2672_dac_ch)
get dac code value from current of a selected DAC channel
Definition: ltc2672.c:148
LTC2672_MUX_IOUT3
@ LTC2672_MUX_IOUT3
Definition: ltc2672.h:147
LTC2672_MUX_VREF
@ LTC2672_MUX_VREF
Definition: ltc2672.h:150
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:58
ltc2672_power_down_channel
int ltc2672_power_down_channel(struct ltc2672_dev *, enum ltc2672_dac_ch)
power down a channel
Definition: ltc2672.c:406
iio_trigger::is_synchronous
bool is_synchronous
Definition: iio_types.h:240
LTC2672_DAC0
@ LTC2672_DAC0
Definition: ltc2672.h:120
ltc2672_remove
int ltc2672_remove(struct ltc2672_dev *)
Remove resources allocated by the init function.
Definition: ltc2672.c:94
no_os_util.h
Header file of utility functions.
LTC2672_MUX_VDD0
@ LTC2672_MUX_VDD0
Definition: ltc2672.h:153
ltc2672_dev::prev_command
uint32_t prev_command
Definition: ltc2672.h:193
LTC2672_MUX_VREF_LO
@ LTC2672_MUX_VREF_LO
Definition: ltc2672.h:151
ltc2672_dev::comm_desc
struct no_os_spi_desc * comm_desc
Definition: ltc2672.h:185
LTC2672_COMMAND24_GENERATE
#define LTC2672_COMMAND24_GENERATE(comm, add, dat)
Definition: ltc2672.h:99
ltc2672_setup_toggle_channel
int ltc2672_setup_toggle_channel(struct ltc2672_dev *, enum ltc2672_dac_ch, uint32_t, uint32_t)
setup toggle parameters for a channel
Definition: ltc2672.c:473
errno.h
Error macro definition for ARM Compiler.
ltc2672_faults
ltc2672_faults
Definition: ltc2672.h:168
ltc2672_current_to_code
uint32_t ltc2672_current_to_code(struct ltc2672_dev *device, uint32_t dac_current, enum ltc2672_dac_ch out_ch)
get dac code value from current of a selected DAC channel
Definition: ltc2672.c:148
LTC2672_MUX_VMINUS
@ LTC2672_MUX_VMINUS
Definition: ltc2672.h:158
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
ltc2672_global_toggle
int ltc2672_global_toggle(struct ltc2672_dev *device, bool is_enable)
enables or disables global toggle bit
Definition: ltc2672.c:556