Go to the documentation of this file.
34 #ifndef __IIO_MAX31827_H__
35 #define __IIO_MAX31827_H__
@ MAX31827_C_UPDATE_INTERVAL
Definition: iio_max31827.c:66
MAX31827 init param.
Definition: max31827.h:130
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
int max31827_iio_init(struct max31827_iio_device **iio_device, struct max31827_iio_init_param *iio_init_param)
Initializes the MAX31827 IIO driver.
Definition: iio_max31827.c:346
char sign
Definition: iio_types.h:153
unsigned int resolution
Definition: max31827.h:122
unsigned int update_interval
Definition: max31827.h:124
int max31827_reg_write(struct max31827_device *dev, uint8_t addr, uint16_t val)
Write a register value.
Definition: max31827.c:121
int max31827_reg_read(struct max31827_device *dev, uint8_t addr, uint16_t *val)
Read a register value.
Definition: max31827.c:96
Definition: iio_max31827.h:54
Structure holding channel attributess.
Definition: iio_types.h:103
#define MAX31827_TH_REG
Definition: max31827.h:42
@ MAX31827_T_RESOLUTION
Definition: iio_max31827.c:65
#define MAX31827_DEVICE_ENABLE(x)
Definition: max31827.h:73
#define MAX31827_CONF_1SHOT_MASK
Definition: max31827.h:47
@ MAX31827_T_MIN_ALARM
Definition: iio_max31827.c:61
@ MAX31827_T_ENABLE
Definition: iio_max31827.c:57
#define MAX31827_CONF_CNV_RATE(x)
Definition: max31827.h:58
int max31827_iio_remove(struct max31827_iio_device *iio_device)
Free resources allocated by the init function.
Definition: iio_max31827.c:377
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
int max31827_remove(struct max31827_device *dev)
Free resources allocated by the init function.
Definition: max31827.c:200
#define MAX31827_IIO_CH_ATTR_RW(_name, _priv)
Definition: iio_max31827.c:40
@ MAX31827_T_MIN_HYST
Definition: iio_max31827.c:60
int max31827_shutdown_write(struct max31827_device *dev, uint8_t reg, uint16_t mask, uint16_t val)
Shutdown then write register value.
Definition: max31827.c:317
int max31827_iio_remove(struct max31827_iio_device *iio_device)
Free resources allocated by the init function.
Definition: iio_max31827.c:377
int max31827_reg_update_bits(struct max31827_device *dev, uint8_t addr, uint16_t mask, uint16_t val)
Read-modify-write operation.
Definition: max31827.c:136
Implementation of MAX31827 Driver.
#define MAX31827_CONF_CNV_RATE_MASK
Definition: max31827.h:48
@ MAX31827_T_MAX_ALARM
Definition: iio_max31827.c:64
@ MAX31827_CNV_1_DIV_64_HZ
Definition: max31827.h:79
@ MAX31827_T_MIN
Definition: iio_max31827.c:59
int max31827_read_temp(struct max31827_device *dev, uint8_t addr, int32_t *val)
Read a temperature from a register.
Definition: max31827.c:261
#define MAX31827_TL_REG
Definition: max31827.h:43
#define MAX31827_CONF_RESO_MASK
Definition: max31827.h:51
#define MAX31827_TL_HYST_REG
Definition: max31827.h:45
const char * name
Definition: iio_types.h:170
int max31827_read_temp_input(struct max31827_device *dev, int32_t *val)
Read input temperature.
Definition: max31827.c:284
@ MAX31827_RES_8_BIT
Definition: max31827.h:92
bool enable
Definition: max31827.h:120
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
Definition: iio_max31827.h:47
#define MAX31827_TH_HYST_REG
Definition: max31827.h:44
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
int max31827_init(struct max31827_device **dev, struct max31827_init_param *init_param)
Device and comm init function.
Definition: max31827.c:158
const uint16_t max31827_conversions[]
MAX31827 conversion period in ms.
Definition: max31827.c:54
#define MAX31827_CONF_RESO(x)
Definition: max31827.h:60
@ MAX31827_T_MAX_HYST
Definition: iio_max31827.c:63
Implementation of IIO MAX31827 Driver.
@ MAX31827_T_MAX
Definition: iio_max31827.c:62
max31827_ch_attr_priv
Definition: iio_max31827.c:56
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
#define MAX31827_IIO_CH_ATTR_RO(_name, _priv)
Definition: iio_max31827.c:48
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
struct iio_device * iio_dev
Definition: iio_max31827.h:49
uint16_t num_ch
Definition: iio_types.h:252
MAX31827 descriptor.
Definition: max31827.h:116
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
#define NULL
Definition: wrapper.h:64
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
@ MAX31827_T_INPUT
Definition: iio_max31827.c:58
#define MAX31827_CONF_REG
Definition: max31827.h:41
uint32_t active_channels
Definition: iio_max31827.h:50
#define MAX31827_CONF_U_TEMP_STAT(x)
Definition: max31827.h:62
Definition: iio_types.h:151
size_t len
Definition: ltc2983.h:284
struct max31827_init_param * init_param
Definition: iio_max31827.h:55
uint8_t no_active_channels
Definition: iio_max31827.h:51
int max31827_write_alarm_val(struct max31827_device *dev, unsigned int reg, int32_t val)
Write the alarm value to the specified register.
Definition: max31827.c:364
struct max31827_device * dev
Definition: iio_max31827.h:48
int max31827_iio_init(struct max31827_iio_device **iio_device, struct max31827_iio_init_param *iio_init_param)
Initializes the MAX31827 IIO driver.
Definition: iio_max31827.c:346
Error macro definition for ARM Compiler.
const uint16_t max31827_resolutions[]
MAX31827 temperature resolution.
Definition: max31827.c:67
#define MAX31827_CONF_O_TEMP_STAT(x)
Definition: max31827.h:64