precision-converters-firmware
Macros
ad717x_support.h File Reference

: Header for AD717x/AD411x No-OS driver supports More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GENMASK(h, l)   (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (31 - (h))))
 
#define BIT(x)   (1UL << (x))
 
#define AD717X_ADCMODE_REG_MODE_MSK   GENMASK(6,4)
 
#define AD717X_ADCMODE_REG_MODE_RD(x)   (((x) >> 4) & 0x7)
 
#define AD717X_CHMAP_REG_CH_EN_RD(x)   (((x) >> 15) & 0x1)
 
#define AD717X_CHMAP_REG_SETUP_SEL_MSK   GENMASK(14,12)
 
#define AD717X_CHMAP_REG_SETUP_SEL_RD(x)   (((x) >> 12) & 0x7)
 
#define AD717X_CHMAP_REG_AINPOS_MSK   GENMASK(9,5)
 
#define AD717X_CHMAP_REG_AINPOS_RD(x)   (((x) >> 5) & 0x1F)
 
#define AD717X_CHMAP_REG_AINNEG_MSK   GENMASK(4,0)
 
#define AD717X_CHMAP_REG_AINNEG_RD(x)   (((x) >> 0) & 0x1F)
 
#define AD4111_CHMAP_REG_INPUT_MSK   GENMASK(9,0)
 
#define AD4111_CHMAP_REG_INPUT_RD(x)   (((x) >> 0) & 0x3FF)
 
#define AD717X_SETUP_CONF_REG_BI_UNIPOLAR_RD(x)   (((x) >> 12) & 0x1)
 
#define AD717X_SETUP_CONF_REG_REF_SEL_MSK   GENMASK(5,4)
 
#define AD717X_SETUP_CONF_REG_REF_SEL_RD(x)   (((x) >> 4) & 0x3)
 
#define AD717X_SETUP_CONF_REG_REF_BUF_MSK   GENMASK(11,10)
 
#define AD717X_SETUP_CONF_REG_REF_BUF_RD(x)   (((x)>> 10) & 0x3)
 
#define AD717X_SETUP_CONF_REG_AIN_BUF_MSK   GENMASK(9,8)
 
#define AD717X_SETUP_CONF_REG_AIN_BUF_RD(x)   (((x) >> 8) & 0x3)
 
#define AD717X_SETUP_CONF_REG_REFBUF_P_RD(x)   (((x) >> 11) & 0x1)
 
#define AD717X_SETUP_CONF_REG_REFBUF_N_RD(x)   (((x) >> 10) & 0x1)
 
#define AD717X_SETUP_CONF_REG_AINBUF_P_RD(x)   (((x) >> 9) & 0x1)
 
#define AD717X_SETUP_CONF_REG_AINBUF_N_RD(x)   (((x) >> 8) & 0x1)
 
#define AD4111_SETUP_CONF_REG_REFPOS_BUF_RD(x)   (((x) >> 11) & 0x1)
 
#define AD4111_SETUP_CONF_REG_REFNEG_BUF_RD(x)   (((x) >> 10) & 0x1)
 
#define AD4111_SETUP_CONF_REG_AIN_BUF_MSK   GENMASK(9,8)
 
#define AD4111_SETUP_CONF_REG_AIN_BUF_RD(x)   (((x) >> 8) & 0x3)
 
#define AD717X_FILT_CONF_REG_ENHFILTEN_RD(x)   (((x) >> 11) & 0x1)
 
#define AD717X_FILT_CONF_REG_ENHFILT_MSK   GENMASK(10,8)
 
#define AD717X_FILT_CONF_REG_ENHFILT_RD(x)   (((x) >> 8) & 0x7)
 
#define AD717X_FILT_CONF_REG_ORDER_MSK   GENMASK(6,5)
 
#define AD717X_FILT_CONF_REG_ORDER_RD(x)   (((x) >> 5) & 0x3)
 
#define AD717X_FILT_CONF_REG_ODR_MSK   GENMASK(4,0)
 
#define AD717X_FILT_CONF_REG_ODR_RD(x)   (((x) >> 0) & 0x1F)
 
#define CONTINUOUS_CONVERSION   0
 
#define SINGLE_CONVERISION   1
 
#define STANDBY_MODE   2
 
#define POWER_DOWN_MODE   3
 
#define INTERNAL_OFFSET_CAL_MODE   4
 
#define INTERNAL_FULL_SCALE_CAL_MODE   5
 

Detailed Description

: Header for AD717x/AD411x No-OS driver supports

:

Copyright (c) 2020 Analog Devices, Inc. All rights reserved.

This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ AD4111_CHMAP_REG_INPUT_MSK

#define AD4111_CHMAP_REG_INPUT_MSK   GENMASK(9,0)

◆ AD4111_CHMAP_REG_INPUT_RD

#define AD4111_CHMAP_REG_INPUT_RD (   x)    (((x) >> 0) & 0x3FF)

◆ AD4111_SETUP_CONF_REG_AIN_BUF_MSK

#define AD4111_SETUP_CONF_REG_AIN_BUF_MSK   GENMASK(9,8)

◆ AD4111_SETUP_CONF_REG_AIN_BUF_RD

#define AD4111_SETUP_CONF_REG_AIN_BUF_RD (   x)    (((x) >> 8) & 0x3)

◆ AD4111_SETUP_CONF_REG_REFNEG_BUF_RD

#define AD4111_SETUP_CONF_REG_REFNEG_BUF_RD (   x)    (((x) >> 10) & 0x1)

◆ AD4111_SETUP_CONF_REG_REFPOS_BUF_RD

#define AD4111_SETUP_CONF_REG_REFPOS_BUF_RD (   x)    (((x) >> 11) & 0x1)

◆ AD717X_ADCMODE_REG_MODE_MSK

#define AD717X_ADCMODE_REG_MODE_MSK   GENMASK(6,4)

◆ AD717X_ADCMODE_REG_MODE_RD

#define AD717X_ADCMODE_REG_MODE_RD (   x)    (((x) >> 4) & 0x7)

◆ AD717X_CHMAP_REG_AINNEG_MSK

#define AD717X_CHMAP_REG_AINNEG_MSK   GENMASK(4,0)

◆ AD717X_CHMAP_REG_AINNEG_RD

#define AD717X_CHMAP_REG_AINNEG_RD (   x)    (((x) >> 0) & 0x1F)

◆ AD717X_CHMAP_REG_AINPOS_MSK

#define AD717X_CHMAP_REG_AINPOS_MSK   GENMASK(9,5)

◆ AD717X_CHMAP_REG_AINPOS_RD

#define AD717X_CHMAP_REG_AINPOS_RD (   x)    (((x) >> 5) & 0x1F)

◆ AD717X_CHMAP_REG_CH_EN_RD

#define AD717X_CHMAP_REG_CH_EN_RD (   x)    (((x) >> 15) & 0x1)

◆ AD717X_CHMAP_REG_SETUP_SEL_MSK

#define AD717X_CHMAP_REG_SETUP_SEL_MSK   GENMASK(14,12)

◆ AD717X_CHMAP_REG_SETUP_SEL_RD

#define AD717X_CHMAP_REG_SETUP_SEL_RD (   x)    (((x) >> 12) & 0x7)

◆ AD717X_FILT_CONF_REG_ENHFILT_MSK

#define AD717X_FILT_CONF_REG_ENHFILT_MSK   GENMASK(10,8)

◆ AD717X_FILT_CONF_REG_ENHFILT_RD

#define AD717X_FILT_CONF_REG_ENHFILT_RD (   x)    (((x) >> 8) & 0x7)

◆ AD717X_FILT_CONF_REG_ENHFILTEN_RD

#define AD717X_FILT_CONF_REG_ENHFILTEN_RD (   x)    (((x) >> 11) & 0x1)

◆ AD717X_FILT_CONF_REG_ODR_MSK

#define AD717X_FILT_CONF_REG_ODR_MSK   GENMASK(4,0)

◆ AD717X_FILT_CONF_REG_ODR_RD

#define AD717X_FILT_CONF_REG_ODR_RD (   x)    (((x) >> 0) & 0x1F)

◆ AD717X_FILT_CONF_REG_ORDER_MSK

#define AD717X_FILT_CONF_REG_ORDER_MSK   GENMASK(6,5)

◆ AD717X_FILT_CONF_REG_ORDER_RD

#define AD717X_FILT_CONF_REG_ORDER_RD (   x)    (((x) >> 5) & 0x3)

◆ AD717X_SETUP_CONF_REG_AIN_BUF_MSK

#define AD717X_SETUP_CONF_REG_AIN_BUF_MSK   GENMASK(9,8)

◆ AD717X_SETUP_CONF_REG_AIN_BUF_RD

#define AD717X_SETUP_CONF_REG_AIN_BUF_RD (   x)    (((x) >> 8) & 0x3)

◆ AD717X_SETUP_CONF_REG_AINBUF_N_RD

#define AD717X_SETUP_CONF_REG_AINBUF_N_RD (   x)    (((x) >> 8) & 0x1)

◆ AD717X_SETUP_CONF_REG_AINBUF_P_RD

#define AD717X_SETUP_CONF_REG_AINBUF_P_RD (   x)    (((x) >> 9) & 0x1)

◆ AD717X_SETUP_CONF_REG_BI_UNIPOLAR_RD

#define AD717X_SETUP_CONF_REG_BI_UNIPOLAR_RD (   x)    (((x) >> 12) & 0x1)

◆ AD717X_SETUP_CONF_REG_REF_BUF_MSK

#define AD717X_SETUP_CONF_REG_REF_BUF_MSK   GENMASK(11,10)

◆ AD717X_SETUP_CONF_REG_REF_BUF_RD

#define AD717X_SETUP_CONF_REG_REF_BUF_RD (   x)    (((x)>> 10) & 0x3)

◆ AD717X_SETUP_CONF_REG_REF_SEL_MSK

#define AD717X_SETUP_CONF_REG_REF_SEL_MSK   GENMASK(5,4)

◆ AD717X_SETUP_CONF_REG_REF_SEL_RD

#define AD717X_SETUP_CONF_REG_REF_SEL_RD (   x)    (((x) >> 4) & 0x3)

◆ AD717X_SETUP_CONF_REG_REFBUF_N_RD

#define AD717X_SETUP_CONF_REG_REFBUF_N_RD (   x)    (((x) >> 10) & 0x1)

◆ AD717X_SETUP_CONF_REG_REFBUF_P_RD

#define AD717X_SETUP_CONF_REG_REFBUF_P_RD (   x)    (((x) >> 11) & 0x1)

◆ BIT

#define BIT (   x)    (1UL << (x))

◆ CONTINUOUS_CONVERSION

#define CONTINUOUS_CONVERSION   0

◆ GENMASK

#define GENMASK (   h,
 
)    (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (31 - (h))))

◆ INTERNAL_FULL_SCALE_CAL_MODE

#define INTERNAL_FULL_SCALE_CAL_MODE   5

◆ INTERNAL_OFFSET_CAL_MODE

#define INTERNAL_OFFSET_CAL_MODE   4

◆ POWER_DOWN_MODE

#define POWER_DOWN_MODE   3

◆ SINGLE_CONVERISION

#define SINGLE_CONVERISION   1

◆ STANDBY_MODE

#define STANDBY_MODE   2