int32_t adt7420_remove(struct adt7420_dev *dev)
Free the resources allocated by adt7420_init().
Definition: adt7420.c:264
uint32_t active_channels
Definition: iio_adt7420.h:53
int32_t adt7420_init(struct adt7420_dev **device, struct adt7420_init_param init_param)
Initializes the communication peripheral and checks if the device is present.
Definition: adt7420.c:202
#define ADT7420_13BIT_DIV
Definition: adt7420.h:101
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
#define ADT7420_REG_T_CRIT_LSB
Definition: adt7420.h:80
struct adt7420_init_param * adt7420_dev_init
Definition: iio_adt7420.h:62
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
char sign
Definition: iio_types.h:153
#define ADT7420_REG_T_CRIT_MSB
Definition: adt7420.h:79
iio device descriptor.
Definition: iio_adt7420.h:50
Structure holding channel attributess.
Definition: iio_types.h:103
#define ADT7320_REG_T_HIGH
Definition: adt7420.h:63
float adt7420_get_temperature(struct adt7420_dev *dev)
Reads the temperature data and converts it to Celsius degrees.
Definition: adt7420.c:370
Configuration structure.
Definition: iio_adt7420.h:61
int adt7420_iio_remove(struct adt7420_iio_dev *desc)
Free the resources allocated by adt7420_iio_init().
Definition: iio_adt7420.c:171
uint8_t resolution_setting
Definition: adt7420.h:147
#define ADT7420_REG_T_HIGH_LSB
Definition: adt7420.h:76
#define ADT7420_16BIT_NEG
Definition: adt7420.h:96
int32_t adt7420_reset(struct adt7420_dev *dev)
Resets the SPI or I2C inteface for the ADT7420/ADT7320.
Definition: adt7420.c:340
enum iio_chan_type ch_type
Definition: iio_types.h:172
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
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
struct iio_dev * iio_dev
Definition: iio_adt7420.h:52
const char * name
Definition: iio_types.h:131
#define ADT7420_16BIT_DIV
Definition: adt7420.h:98
#define ADT7320_REG_T_LOW
Definition: adt7420.h:64
#define ADT7420_REG_T_LOW_MSB
Definition: adt7420.h:77
uint8_t no_active_channels
Definition: iio_adt7420.h:54
#define ADT7420_REG_HIST
Definition: adt7420.h:81
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
int adt7420_iio_init(struct adt7420_iio_dev **iio_dev, struct adt7420_iio_init_param *init_param)
Initializes the adt7420 IIO driver.
Definition: iio_adt7420.c:135
#define ADT7420_13BIT_NEG
Definition: adt7420.h:99
#define ADT7320_REG_T_CRIT
Definition: adt7420.h:61
struct adt7420_dev * adt7420_dev
Definition: iio_adt7420.h:51
#define ADT7420_REG_T_LOW_LSB
Definition: adt7420.h:78
Definition: adt7420.h:151
int adt7420_iio_init(struct adt7420_iio_dev **iio_dev, struct adt7420_iio_init_param *init_param)
Initializes the adt7420 IIO driver.
Definition: iio_adt7420.c:135
Header file of I2C Interface.
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
#define ADT7420_REG_T_HIGH_MSB
Definition: adt7420.h:75
uint32_t address
Definition: iio_types.h:113
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
@ IIO_TEMP
Definition: iio_types.h:69
unsigned int no_os_hweight8(uint8_t word)
int adt7420_reg_read(struct adt7420_dev *dev, uint16_t register_address, uint16_t *data)
Reads the value of a register.
Definition: adt7420.c:75
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
Definition: adt7420.h:139
int adt7420_iio_remove(struct adt7420_iio_dev *desc)
Free the resources allocated by adt7420_iio_init().
Definition: iio_adt7420.c:171
Definition: iio_types.h:151
#define ADT7320_REG_HIST
Definition: adt7420.h:62
Header file of IIO ADT7420 Driver.
Header file of utility functions.
int adt7420_reg_write(struct adt7420_dev *dev, uint16_t register_address, uint32_t data)
Sets the value of a register SPI/I2C.
Definition: adt7420.c:178
#define ADT7420_16BIT_SIGN
Definition: adt7420.h:97
#define ADT7420_13BIT_SIGN
Definition: adt7420.h:100
bool adt7420_is_spi(struct adt7420_dev *dev)
Check if the interface of the selected device is SPI.
Definition: adt7420.c:477
Header file of ADT7420 Driver.