![]() |
no-OS
|
Header file of AD7490 Driver. More...
Go to the source code of this file.
Classes | |
struct | ad7490_init_param |
struct | ad7490_desc |
Macros | |
#define | AD7490_LOW_BYTE_MASK NO_OS_GENMASK(7, 0) |
#define | AD7490_HIGH_BYTE_MASK NO_OS_GENMASK(15, 8) |
#define | AD7490_VAL_MASK NO_OS_GENMASK(11, 0) |
#define | AD7490_WRITE_MASK NO_OS_BIT(11) |
#define | AD7490_SEQ_MASK NO_OS_BIT(10) |
#define | AD7490_ADD_MASK NO_OS_GENMASK(9, 6) |
#define | AD7490_PM_MASK NO_OS_GENMASK(5, 4) |
#define | AD7490_SHADOW_MASK NO_OS_BIT(3) |
#define | AD7490_WEAKTRI_MASK NO_OS_BIT(2) |
#define | AD7490_RANGE_MASK NO_OS_BIT(1) |
#define | AD7490_CODING_MASK NO_OS_BIT(0) |
#define | AD7490_CFG_MASK NO_OS_GENMASK(2, 0) |
Functions | |
int | ad7490_set_op_mode (struct ad7490_desc *desc, enum ad7490_op_mode op_mode) |
Set AD7490 operating mode. | |
int | ad7490_config (struct ad7490_desc *desc, enum ad7490_dout_state dout_state, enum ad7490_range range, enum ad7490_coding coding) |
Config DOUT state, range and coding of the AD7490. | |
int | ad7490_read_ch (struct ad7490_desc *desc, enum ad7490_address channel, int16_t *val) |
Read single cannel raw value. | |
int | ad7490_start_seq (struct ad7490_desc *desc, enum ad7490_seq_op seq_op, uint16_t channels, enum ad7490_address last_chan) |
Start AD7490 SEQUENCER using desired type. | |
int | ad7490_change_seq (struct ad7490_desc *desc, enum ad7490_seq_op seq_op, enum ad7490_coding coding, enum ad7490_range range) |
Change AD7490 SEQUENCER type while it is active. | |
int | ad7490_stop_seq (struct ad7490_desc *desc) |
Stop AD7490 SEQUENCER. | |
int | ad7490_read_seq (struct ad7490_desc *desc, int16_t *channels_val) |
Read selected channels of the SEQUENCER raw values. | |
int | ad7490_init (struct ad7490_desc **desc, struct ad7490_init_param *init_param) |
AD7490 Initialization function. | |
int | ad7490_remove (struct ad7490_desc *desc) |
Free the resources allocated by initialization. | |
Header file of AD7490 Driver.
Copyright 2025(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 AD7490_ADD_MASK NO_OS_GENMASK(9, 6) |
#define AD7490_CFG_MASK NO_OS_GENMASK(2, 0) |
#define AD7490_CODING_MASK NO_OS_BIT(0) |
#define AD7490_HIGH_BYTE_MASK NO_OS_GENMASK(15, 8) |
#define AD7490_LOW_BYTE_MASK NO_OS_GENMASK(7, 0) |
#define AD7490_PM_MASK NO_OS_GENMASK(5, 4) |
#define AD7490_RANGE_MASK NO_OS_BIT(1) |
#define AD7490_SEQ_MASK NO_OS_BIT(10) |
#define AD7490_SHADOW_MASK NO_OS_BIT(3) |
#define AD7490_VAL_MASK NO_OS_GENMASK(11, 0) |
#define AD7490_WEAKTRI_MASK NO_OS_BIT(2) |
#define AD7490_WRITE_MASK NO_OS_BIT(11) |
enum ad7490_address |
enum ad7490_coding |
enum ad7490_dout_state |
enum ad7490_op_mode |
enum ad7490_range |
enum ad7490_seq_op |
enum ad7490_vdd |
int ad7490_change_seq | ( | struct ad7490_desc * | desc, |
enum ad7490_seq_op | seq_op, | ||
enum ad7490_coding | coding, | ||
enum ad7490_range | range ) |
Change AD7490 SEQUENCER type while it is active.
desc | - AD7490 device descriptor. |
seq_op | - Selected SEQUENCER type to change to. |
coding | - If CONTROL sequencer is selected, coding is requested. |
range | -If CONTROL sequencer is selected, range is requested. |
int ad7490_config | ( | struct ad7490_desc * | desc, |
enum ad7490_dout_state | dout_state, | ||
enum ad7490_range | range, | ||
enum ad7490_coding | coding ) |
Config DOUT state, range and coding of the AD7490.
desc | - AD7490 device descriptor. |
dout_state | - Selected DOUT state. |
range | - Selected range (REFIN or 2xREFIN) |
coding | - Selected coding style (binary or twos) |
int ad7490_init | ( | struct ad7490_desc ** | desc, |
struct ad7490_init_param * | init_param ) |
AD7490 Initialization function.
desc | - AD7490 device descriptor. |
init_param | - AD7490 initialization parameter. |
int ad7490_read_ch | ( | struct ad7490_desc * | desc, |
enum ad7490_address | channel, | ||
int16_t * | val ) |
Read single cannel raw value.
desc | - AD7490 device descriptor. |
channel | - Selected channel for value reading. |
val | - Pointer to the selected channel's raw value. |
int ad7490_read_seq | ( | struct ad7490_desc * | desc, |
int16_t * | channels_val ) |
Read selected channels of the SEQUENCER raw values.
desc | - AD7490 device descriptor. |
channels_val | - Pointer to selected channels raw values array. Raw channels values are to be transmitted consecutive (e.g. if channels 0, 3, and 7 are selected, channels_val becomes an array with 3 elements, and index 0 is for channel 0, index 1 for channel 3, and index 2 for channel 7). |
int ad7490_remove | ( | struct ad7490_desc * | desc | ) |
Free the resources allocated by initialization.
desc | - AD7490 device descriptor. |
int ad7490_set_op_mode | ( | struct ad7490_desc * | desc, |
enum ad7490_op_mode | op_mode ) |
Set AD7490 operating mode.
desc | - AD7490 device descriptor |
op_mode | - Selected operating mode. |
int ad7490_start_seq | ( | struct ad7490_desc * | desc, |
enum ad7490_seq_op | seq_op, | ||
uint16_t | channels, | ||
enum ad7490_address | last_chan ) |
Start AD7490 SEQUENCER using desired type.
desc | - AD7490 device descriptor. |
seq_op | - Selected SEQUENCER type. |
channels | - 16 bit channel mask for channel selection (1 = ON, 0 = OFF) |
last_chan | - In case CONSECUTIVE sequencer typee is selected, last channel is needed for conversion and all channels until the last one will be then selected. |
int ad7490_stop_seq | ( | struct ad7490_desc * | desc | ) |
Stop AD7490 SEQUENCER.
desc | - AD7490 device descriptor. |