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