drivers: adc: adc_ads1119: Fix configuration register access.
The adc_ads1119 driver is unable to overwrite the configuration register, the chip therefore always works with its default settings. Register access macros are fixed by this commit. Fixes: #70091 Signed-off-by: Jan Kubiznak <jan.kubiznak@deveritec.com>
This commit is contained in:
parent
a70ba00fd3
commit
ba90f160b9
1 changed files with 5 additions and 5 deletions
|
@ -21,11 +21,11 @@
|
|||
LOG_MODULE_REGISTER(ADS1119, CONFIG_ADC_LOG_LEVEL);
|
||||
|
||||
|
||||
#define ADS1119_CONFIG_VREF(x) ((x) & BIT(0))
|
||||
#define ADS1119_CONFIG_CM(x) ((x) & BIT(1))
|
||||
#define ADS1119_CONFIG_DR(x) ((x) & (BIT_MASK(2) << 2))
|
||||
#define ADS1119_CONFIG_GAIN(x) ((x) & BIT(4))
|
||||
#define ADS1119_CONFIG_MUX(x) ((x) & (BIT_MASK(3) << 5))
|
||||
#define ADS1119_CONFIG_VREF(x) (FIELD_PREP(BIT(0), x))
|
||||
#define ADS1119_CONFIG_CM(x) (FIELD_PREP(BIT(1), x))
|
||||
#define ADS1119_CONFIG_DR(x) (FIELD_PREP(BIT_MASK(2) << 2, x))
|
||||
#define ADS1119_CONFIG_GAIN(x) (FIELD_PREP(BIT(4), x))
|
||||
#define ADS1119_CONFIG_MUX(x) (FIELD_PREP(BIT_MASK(3) << 5, x))
|
||||
|
||||
#define ADS1119_STATUS_MASK_ID BIT_MASK(7)
|
||||
#define ADS1119_STATUS_MASK_READY BIT(7)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue