Go to the documentation of this file.
39 #ifndef __MAX31875_H__
40 #define __MAX31875_H__
55 #define MAX31875_TEMPERATURE_REG 0x0
56 #define MAX31875_CONFIGURATION_REG 0x1
57 #define MAX31875_THYST_REG 0x2
58 #define MAX31875_TOS_REG 0x3
61 #define MAX31875_OVER_TEMP_STATUS_MASK NO_OS_BIT(15)
62 #define MAX31875_FAULT_QUEUE_MASK NO_OS_GENMASK(12, 11)
63 #define MAX31875_COMP_INT_MASK NO_OS_BIT(9)
64 #define MAX31875_SHUTDOWN_MASK NO_OS_BIT(8)
65 #define MAX31875_DATA_FORMAT_MASK NO_OS_BIT(7)
66 #define MAX31875_RESOLUTION_MASK NO_OS_GENMASK(6, 5)
67 #define MAX31875_TIMEOUT_MASK NO_OS_BIT(4)
68 #define MAX31875_PEC_MASK NO_OS_BIT(3)
69 #define MAX31875_CONVERSION_RATE_MASK NO_OS_GENMASK(2, 1)
70 #define MAX31875_ONESHOT_MASK NO_OS_BIT(0)
int32_t max31875_reg_read(struct max31875_dev *dev, uint32_t reg, uint32_t *readval)
Read a device register through the I2C interface.
Definition: max31875.c:58
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:85
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:51
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:70
@ MAX31875R2
Definition: max31875.h:83
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:56
int32_t max31875_remove(struct max31875_dev *dev)
Free memory allocated by max31875_init().
Definition: max31875.c:173
int32_t max31875_reg_write(struct max31875_dev *dev, uint32_t reg, uint32_t writeval)
Write a device register through the I2C interface.
Definition: max31875.c:90
Definition: ad9361_util.h:75
struct no_os_i2c_init_param i2c_init
Definition: max31875.h:106
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
@ MAX31875R7
Definition: max31875.h:88
int32_t max31875_init(struct max31875_dev **device, struct max31875_init_param *init_param)
Initialize the device driver befre use.
Definition: max31875.c:141
int32_t max31875_reg_write_mask(struct max31875_dev *dev, uint32_t reg, uint32_t val, uint32_t mask)
Read-modify-write operation on a field of a register.
Definition: max31875.c:114
@ MAX31875R1
Definition: max31875.h:82
MAX31875 driver initailization structure.
Definition: max31875.h:104
Structure holding I2C descriptor.
Definition: no_os_i2c.h:81
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:104
Header file of I2C Interface.
@ MAX31875R3
Definition: max31875.h:84
int32_t max31875_reg_write_mask(struct max31875_dev *dev, uint32_t reg, uint32_t val, uint32_t mask)
Read-modify-write operation on a field of a register.
Definition: max31875.c:114
int32_t max31875_remove(struct max31875_dev *dev)
Free memory allocated by max31875_init().
Definition: max31875.c:173
int32_t max31875_reg_write(struct max31875_dev *dev, uint32_t reg, uint32_t writeval)
Write a device register through the I2C interface.
Definition: max31875.c:90
@ MAX31875R5
Definition: max31875.h:86
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
max31875_i2c_addr
Defines the potential device I2C addresses.
Definition: max31875.h:80
struct no_os_i2c_desc * i2c_desc
Definition: max31875.h:97
int32_t max31875_reg_read(struct max31875_dev *dev, uint32_t reg, uint32_t *readval)
Read a device register through the I2C interface.
Definition: max31875.c:58
@ MAX31875R4
Definition: max31875.h:85
MAX31875 handler structure.
Definition: max31875.h:95
int32_t max31875_init(struct max31875_dev **device, struct max31875_init_param *init_param)
Initialize the device driver befre use.
Definition: max31875.c:141
@ MAX31875R6
Definition: max31875.h:87
Header file of utility functions.
Header file of MAX31875 Driver.
@ MAX31875R0
Definition: max31875.h:81