Go to the documentation of this file.
48 #define AD799X_CHANNEL(ch) ((1 << ch) << 4)
49 #define AD799X_REF_SEL (1 << 3)
50 #define AD799X_FLTR (1 << 2)
51 #define AD799X_BIT_TRIAL_DELAY (1 << 1)
52 #define AD799X_SAMPLE_DELAY (1 << 0)
92 uint8_t register_value);
@ AD7995
Definition: ad799x.h:61
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
float ad799x_convert_to_volts(struct ad799x_dev *dev, int16_t raw_sample, float v_ref)
Converts a raw sample to volts.
Definition: ad799x.c:150
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
struct no_os_i2c_desc * i2c_desc
Definition: ad799x.h:67
Definition: ad9361_util.h:69
enum ad799x_type part_number
Definition: ad799x.h:76
int32_t ad799x_remove(struct ad799x_dev *dev)
Free the resources allocated by ad799x_init().
Definition: ad799x.c:94
Header file of AD799x Driver.
struct no_os_i2c_init_param i2c_init
Definition: ad799x.h:74
void ad799x_set_configuration_reg(struct ad799x_dev *dev, uint8_t register_value)
Writes data into the Configuration Register.
Definition: ad799x.c:113
float ad799x_convert_to_volts(struct ad799x_dev *dev, int16_t raw_sample, float v_ref)
Converts a raw sample to volts.
Definition: ad799x.c:150
void ad799x_set_configuration_reg(struct ad799x_dev *dev, uint8_t register_value)
Writes data into the Configuration Register.
Definition: ad799x.c:113
int8_t ad799x_init(struct ad799x_dev **device, struct ad799x_init_param init_param)
Initializes I2C.
Definition: ad799x.c:56
uint8_t bits_number
Definition: ad799x.h:69
void ad799x_get_conversion_result(struct ad799x_dev *dev, int16_t *conv_value, int8_t *channel)
Reads the High byte and the Low byte of the conversion.
Definition: ad799x.c:128
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
@ AD7999
Definition: ad799x.h:62
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
Header file of I2C Interface.
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
ad799x_type
Definition: ad799x.h:59
@ AD7991
Definition: ad799x.h:60
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
void ad799x_get_conversion_result(struct ad799x_dev *dev, int16_t *conv_value, int8_t *channel)
Reads the High byte and the Low byte of the conversion.
Definition: ad799x.c:128
int8_t ad799x_init(struct ad799x_dev **device, struct ad799x_init_param init_param)
Initializes I2C.
Definition: ad799x.c:56
int32_t ad799x_remove(struct ad799x_dev *dev)
Free the resources allocated by ad799x_init().
Definition: ad799x.c:94