Go to the documentation of this file.
40 #define AD7689_CFG_CFG_MSK NO_OS_BIT(13)
41 #define AD7689_CFG_INCC_MSK NO_OS_GENMASK(12,10)
42 #define AD7689_CFG_INX_MSK NO_OS_GENMASK(9,7)
43 #define AD7689_CFG_BW_MSK NO_OS_BIT(6)
44 #define AD7689_CFG_REF_MSK NO_OS_GENMASK(5,3)
45 #define AD7689_CFG_SEQ_MSK NO_OS_GENMASK(2,1)
46 #define AD7689_CFG_RB_MSK NO_OS_BIT(0)
173 uint32_t nb_samples);
int32_t ad7689_read_config(struct ad7689_dev *dev, struct ad7689_config *config)
Read the device's CFG register.
Definition: ad7689.c:216
@ AD7689_UNIPOLAR_GND
Definition: ad7689.h:79
@ AD7689_SEQ_UPDATE_CFG
Definition: ad7689.h:120
#define AD7689_CFG_REF_MSK
Definition: ad7689.h:44
enum ad7689_ref ref
Definition: ad7689.h:139
@ AD7689_SEQ_SCAN_ALL
Definition: ad7689.h:124
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:159
struct no_os_spi_desc * spi_desc
Definition: ad7689.h:163
Header file of SPI Interface.
@ ID_AD7689
Definition: ad7689.h:54
#define AD7689_CFG_RB_MSK
Definition: ad7689.h:46
int32_t ad7689_write_config(struct ad7689_dev *dev, struct ad7689_config *config)
Write the device's CFG register.
Definition: ad7689.c:193
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
@ AD7689_SEQ_DISABLE
Definition: ad7689.h:118
int32_t ad7689_read(struct ad7689_dev *dev, uint16_t *data, uint32_t nb_samples)
Read ADC samples.
Definition: ad7689.c:250
Header file of Delay functions.
int32_t ad7689_write_config(struct ad7689_dev *dev, struct ad7689_config *config)
Write the device's CFG register.
Definition: ad7689.c:193
enum ad7689_bw bw
Definition: ad7689.h:137
ad7689_bw
Low-pass filter bandwidth selection.
Definition: ad7689.h:86
#define AD7689_CFG_INCC_MSK
Definition: ad7689.h:41
AD7689 configuration.
Definition: ad7689.h:131
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:54
bool
Definition: common.h:48
enum ad7689_incc incc
Definition: ad7689.h:133
ad7689_ref
Reference/buffer selection.
Definition: ad7689.h:97
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
@ AD7689_BW_QUARTER
Definition: ad7689.h:88
@ AD7689_SEQ_SCAN_ALL_THEN_TEMP
Definition: ad7689.h:122
@ AD7689_TEMPERATURE_SENSOR
Definition: ad7689.h:73
const char * name
Definition: ad7689.h:157
@ AD7689_UNIPOLAR_DIFFERENTIAL_PAIRS
Definition: ad7689.h:75
@ AD7689_BIPOLAR_DIFFERENTIAL_PAIRS
Definition: ad7689.h:69
struct ad7689_config configs[2]
Definition: ad7689.h:161
bool rb
Definition: ad7689.h:143
#define AD7689_CFG_CFG_MSK
Definition: ad7689.h:40
ad7689_device_id
Device ID definitions.
Definition: ad7689.h:52
@ AD7689_BW_FULL
Definition: ad7689.h:90
@ AD7689_UNIPOLAR_COM
Definition: ad7689.h:77
@ ID_AD7949
Definition: ad7689.h:58
struct ad7689_config config
Definition: ad7689.h:150
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define AD7689_CFG_INX_MSK
Definition: ad7689.h:42
enum ad7689_seq seq
Definition: ad7689.h:141
int32_t ad7689_remove(struct ad7689_dev *dev)
Remove the driver's descriptor by freeing the associated resources.
Definition: ad7689.c:279
#define AD7689_CFG_SEQ_MSK
Definition: ad7689.h:45
ad7689_seq
Channel sequencer configuration.
Definition: ad7689.h:116
Header file for the ad7689 driver.
ad7689_incc
Input channel configuration.
Definition: ad7689.h:67
@ AD7689_REF_IBUF
Definition: ad7689.h:109
@ ID_AD7699
Definition: ad7689.h:60
enum ad7689_device_id id
Definition: ad7689.h:159
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
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:69
@ AD7689_BIPOLAR_COM
Definition: ad7689.h:71
@ AD7689_REF_EXTERNAL_TEMP_IBUF
Definition: ad7689.h:105
int32_t ad7689_remove(struct ad7689_dev *dev)
Remove the driver's descriptor by freeing the associated resources.
Definition: ad7689.c:279
#define NULL
Definition: wrapper.h:64
@ AD7689_REF_INTERNAL_4p096V
Definition: ad7689.h:101
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int32_t ad7689_init(struct ad7689_dev **dev, struct ad7689_init_param *init_param)
Initialize the ad7689 driver and create a descriptor.
Definition: ad7689.c:141
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:116
uint8_t inx
Definition: ad7689.h:135
@ AD7689_REF_EXTERNAL
Definition: ad7689.h:107
int32_t ad7689_read(struct ad7689_dev *dev, uint16_t *data, uint32_t nb_samples)
Read ADC samples.
Definition: ad7689.c:250
@ ID_AD7682
Definition: ad7689.h:56
int32_t ad7689_init(struct ad7689_dev **dev, struct ad7689_init_param *init_param)
Initialize the ad7689 driver and create a descriptor.
Definition: ad7689.c:141
@ AD7689_REF_INTERNAL_2p5V
Definition: ad7689.h:99
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:52
Header file of utility functions.
struct no_os_spi_init_param spi_init
Definition: ad7689.h:152
const char * ad7689_device_name[]
Definition: ad7689.c:41
int32_t ad7689_read_config(struct ad7689_dev *dev, struct ad7689_config *config)
Read the device's CFG register.
Definition: ad7689.c:216
#define AD7689_CFG_BW_MSK
Definition: ad7689.h:43
@ AD7689_REF_EXTERNAL_TEMP
Definition: ad7689.h:103
enum ad7689_device_id id
Definition: ad7689.h:148
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140