Go to the documentation of this file.
33 #ifndef __MAX31875_H__
34 #define __MAX31875_H__
49 #define MAX31875_TEMPERATURE_REG 0x0
50 #define MAX31875_CONFIGURATION_REG 0x1
51 #define MAX31875_THYST_REG 0x2
52 #define MAX31875_TOS_REG 0x3
55 #define MAX31875_OVER_TEMP_STATUS_MASK NO_OS_BIT(15)
56 #define MAX31875_FAULT_QUEUE_MASK NO_OS_GENMASK(12, 11)
57 #define MAX31875_COMP_INT_MASK NO_OS_BIT(9)
58 #define MAX31875_SHUTDOWN_MASK NO_OS_BIT(8)
59 #define MAX31875_DATA_FORMAT_MASK NO_OS_BIT(7)
60 #define MAX31875_RESOLUTION_MASK NO_OS_GENMASK(6, 5)
61 #define MAX31875_TIMEOUT_MASK NO_OS_BIT(4)
62 #define MAX31875_PEC_MASK NO_OS_BIT(3)
63 #define MAX31875_CONVERSION_RATE_MASK NO_OS_GENMASK(2, 1)
64 #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:53
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
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
@ MAX31875R2
Definition: max31875.h:77
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
int32_t max31875_remove(struct max31875_dev *dev)
Free memory allocated by max31875_init().
Definition: max31875.c:168
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:85
Definition: ad9361_util.h:69
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
struct no_os_i2c_init_param i2c_init
Definition: max31875.h:100
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
@ MAX31875R7
Definition: max31875.h:82
int32_t max31875_init(struct max31875_dev **device, struct max31875_init_param *init_param)
Initialize the device driver befre use.
Definition: max31875.c:136
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:109
@ MAX31875R1
Definition: max31875.h:76
MAX31875 driver initailization structure.
Definition: max31875.h:98
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
Header file of I2C Interface.
@ MAX31875R3
Definition: max31875.h:78
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
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:109
int32_t max31875_remove(struct max31875_dev *dev)
Free memory allocated by max31875_init().
Definition: max31875.c:168
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:85
@ MAX31875R5
Definition: max31875.h:80
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
max31875_i2c_addr
Defines the potential device I2C addresses.
Definition: max31875.h:74
struct no_os_i2c_desc * i2c_desc
Definition: max31875.h:91
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:53
@ MAX31875R4
Definition: max31875.h:79
MAX31875 handler structure.
Definition: max31875.h:89
int32_t max31875_init(struct max31875_dev **device, struct max31875_init_param *init_param)
Initialize the device driver befre use.
Definition: max31875.c:136
@ MAX31875R6
Definition: max31875.h:81
Header file of utility functions.
Header file of MAX31875 Driver.
@ MAX31875R0
Definition: max31875.h:75