Go to the documentation of this file.
50 #define LTC2983_STATUS_REG 0x0000
51 #define LTC2983_TEMP_RES_START_REG 0x0010
52 #define LTC2983_EEPROM_KEY_REG 0x00B0
53 #define LTC2983_EEPROM_READ_STATUS_REG 0x00D0
54 #define LTC2983_GLOBAL_CONFIG_REG 0x00F0
55 #define LTC2986_EEPROM_STATUS_REG 0x00F9
56 #define LTC2983_MUX_CONFIG_REG 0x00FF
57 #define LTC2983_CHAN_ASSIGN_START_REG 0x0200
58 #define LTC2983_CUST_SENS_TBL_START_REG 0x0250
59 #define LTC2983_CUST_SENS_TBL_END_REG 0x03CF
61 #define LTC2983_CUST_SENS_TBL_SIZE LTC2983_CUST_SENS_TBL_END_REG - \
62 LTC2983_CUST_SENS_TBL_START_REG + 1
63 #define LTC2983_SPI_READ_BYTE 0x3
64 #define LTC2983_SPI_WRITE_BYTE 0x2
66 #define LTC2983_EEPROM_KEY 0xA53C0F5A
67 #define LTC2983_EEPROM_WRITE_CMD 0x15
68 #define LTC2983_EEPROM_READ_CMD 0x16
69 #define LTC2983_EEPROM_STATUS_FAILURE_MASK NO_OS_GENMASK(3, 1)
70 #define LTC2983_EEPROM_READ_FAILURE_MASK NO_OS_GENMASK(7, 0)
72 #define LTC2983_EEPROM_WRITE_TIME_MS 2600
73 #define LTC2983_EEPROM_READ_TIME_MS 20
75 #define LTC2983_CHAN_START_ADDR(chan) \
76 (((chan - 1) * 4) + LTC2983_CHAN_ASSIGN_START_REG)
77 #define LTC2983_CHAN_RES_ADDR(chan) \
78 (((chan - 1) * 4) + LTC2983_TEMP_RES_START_REG)
80 #define LTC2983_COMMON_HARD_FAULT_MASK NO_OS_GENMASK(31, 30)
81 #define LTC2983_COMMON_SOFT_FAULT_MASK NO_OS_GENMASK(27, 25)
83 #define LTC2983_STATUS_START_MASK NO_OS_BIT(7)
84 #define LTC2983_STATUS_START(x) no_os_field_prep(LTC2983_STATUS_START_MASK, x)
85 #define LTC2983_STATUS_UP_MASK NO_OS_GENMASK(7, 6)
86 #define LTC2983_STATUS_UP(reg) no_os_field_get(LTC2983_STATUS_UP_MASK, reg)
88 #define LTC2983_STATUS_CHAN_SEL_MASK NO_OS_GENMASK(4, 0)
89 #define LTC2983_STATUS_CHAN_SEL(x) \
90 no_os_field_prep(LTC2983_STATUS_CHAN_SEL_MASK, x)
92 #define LTC2983_NOTCH_FREQ_MASK NO_OS_GENMASK(1, 0)
94 #define LTC2983_RES_VALID_MASK NO_OS_BIT(24)
95 #define LTC2983_DATA_SIGN_BIT 23
96 #define LTC2983_DATA_MASK NO_OS_GENMASK(LTC2983_DATA_SIGN_BIT, 0)
98 #define LTC2983_CHAN_TYPE_MASK NO_OS_GENMASK(31, 27)
99 #define LTC2983_CHAN_TYPE(x) no_os_field_prep(LTC2983_CHAN_TYPE_MASK, x)
101 #define LTC2983_CHAN_ASSIGN_MASK NO_OS_GENMASK(26, 22)
102 #define LTC2983_CHAN_ASSIGN(x) no_os_field_prep(LTC2983_CHAN_ASSIGN_MASK, x)
104 #define LTC2983_CUSTOM_LEN_MASK NO_OS_GENMASK(5, 0)
105 #define LTC2983_CUSTOM_LEN(x) no_os_field_prep(LTC2983_CUSTOM_LEN_MASK, x)
107 #define LTC2983_CUSTOM_ADDR_MASK NO_OS_GENMASK(11, 6)
108 #define LTC2983_CUSTOM_ADDR(x) no_os_field_prep(LTC2983_CUSTOM_ADDR_MASK, x)
110 #define LTC2983_THERMOCOUPLE_CFG_MASK NO_OS_GENMASK(21, 18)
111 #define LTC2983_THERMOCOUPLE_CFG(x) \
112 no_os_field_prep(LTC2983_THERMOCOUPLE_CFG_MASK, x)
113 #define LTC2983_THERMOCOUPLE_HARD_FAULT_MASK NO_OS_GENMASK(31, 29)
114 #define LTC2983_THERMOCOUPLE_SOFT_FAULT_MASK NO_OS_GENMASK(28, 25)
116 #define LTC2983_RTD_CFG_MASK NO_OS_GENMASK(21, 18)
117 #define LTC2983_RTD_CFG(x) no_os_field_prep(LTC2983_RTD_CFG_MASK, x)
118 #define LTC2983_RTD_EXC_CURRENT_MASK NO_OS_GENMASK(17, 14)
119 #define LTC2983_RTD_EXC_CURRENT(x) \
120 no_os_field_prep(LTC2983_RTD_EXC_CURRENT_MASK, x)
121 #define LTC2983_RTD_CURVE_MASK NO_OS_GENMASK(13, 12)
122 #define LTC2983_RTD_CURVE(x) no_os_field_prep(LTC2983_RTD_CURVE_MASK, x)
124 #define LTC2983_THERMISTOR_CFG_MASK NO_OS_GENMASK(21, 19)
125 #define LTC2983_THERMISTOR_CFG(x) \
126 no_os_field_prep(LTC2983_THERMISTOR_CFG_MASK, x)
127 #define LTC2983_THERMISTOR_EXC_CURRENT_MASK NO_OS_GENMASK(18, 15)
128 #define LTC2983_THERMISTOR_EXC_CURRENT(x) \
129 no_os_field_prep(LTC2983_THERMISTOR_EXC_CURRENT_MASK, x)
131 #define LTC2983_DIODE_CFG_MASK NO_OS_GENMASK(26, 24)
132 #define LTC2983_DIODE_CFG(x) no_os_field_prep(LTC2983_DIODE_CFG_MASK, x)
133 #define LTC2983_DIODE_EXC_CURRENT_MASK NO_OS_GENMASK(23, 22)
134 #define LTC2983_DIODE_EXC_CURRENT(x) \
135 no_os_field_prep(LTC2983_DIODE_EXC_CURRENT_MASK, x)
136 #define LTC2983_DIODE_IDEAL_FACTOR_MASK NO_OS_GENMASK(21, 0)
137 #define LTC2983_DIODE_IDEAL_FACTOR(x) \
138 no_os_field_prep(LTC2983_DIODE_IDEAL_FACTOR_MASK, x)
140 #define LTC2983_R_SENSE_VAL_MASK NO_OS_GENMASK(26, 0)
141 #define LTC2983_R_SENSE_VAL(x) no_os_field_prep(LTC2983_R_SENSE_VAL_MASK, x)
143 #define LTC2983_ADC_SINGLE_ENDED_MASK NO_OS_BIT(26)
144 #define LTC2983_ADC_SINGLE_ENDED(x) \
145 no_os_field_prep(LTC2983_ADC_SINGLE_ENDED_MASK, x)
204 #define to_thermocouple(_sensor) \
205 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_thermocouple, sensor)
207 #define to_rtd(_sensor) \
208 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_rtd, sensor)
210 #define to_thermistor(_sensor) \
211 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_thermistor, sensor)
213 #define to_diode(_sensor) \
214 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_diode, sensor)
216 #define to_rsense(_sensor) \
217 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_rsense, sensor)
219 #define to_adc(_sensor) \
220 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_adc, sensor)
222 #define to_temp(_sensor) \
223 NO_OS_CONTAINER_OF(_sensor, struct ltc2983_temp, sensor)
@ LTC2983_THERMISTOR_CUSTOM_STEINHART_HART
Definition: ltc2983.h:196
@ LTC2983_RTD_PT_10
Definition: ltc2983.h:180
struct no_os_gpio_init_param gpio_rstn
Definition: ltc2983.h:232
void no_os_put_unaligned_be16(uint16_t val, uint8_t *buf)
int ltc2983_rtd_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for RTD sensors.
Definition: ltc2983.c:517
void no_os_put_unaligned_be24(uint32_t val, uint8_t *buf)
@ LTC2983_50HZ_REJECTION
Definition: ltc2983.h:163
uint32_t timeout
Definition: ad413x.c:49
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
@ ID_LTC2984
Definition: ltc2983.h:153
@ LTC2983_THERMOCOUPLE_E
Definition: ltc2983.h:173
@ LTC2983_THERMISTOR_CUSTOM
Definition: ltc2983.h:197
struct ltc2983_sensor * sensors[20]
Definition: ltc2983.h:260
uint32_t r_sense_val_dec_1024
Definition: ltc2983.h:368
@ LTC2983_RTD_CUSTOM
Definition: ltc2983.h:188
@ LTC2983_DIRECT_ADC
Definition: ltc2983.h:200
uint32_t r_sense_val_int
Definition: ltc2983.h:366
struct ideal_factor_value ideal_factor_val
Definition: ltc2983.h:358
#define LTC2983_THERMOCOUPLE_HARD_FAULT_MASK
Definition: ltc2983.h:113
uint8_t max_channels_nr
Definition: ltc2983.h:264
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
int ltc2983_remove(struct ltc2983_desc *)
Remove resources allocated by the init function.
Definition: ltc2983.c:130
@ LTC2983_THERMOCOUPLE_K
Definition: ltc2983.h:172
#define LTC2983_RES_VALID_MASK
Definition: ltc2983.h:94
#define LTC2983_DIODE_CFG(x)
Definition: ltc2983.h:132
Header file of SPI Interface.
#define LTC2983_DATA_SIGN_BIT
Definition: ltc2983.h:95
@ LTC2983_THERMISTOR_44004_44033
Definition: ltc2983.h:189
enum ltc2983_filter_notch_freq filter_notch_freq
Definition: ltc2983.h:236
@ LTC2983_THERMOCOUPLE_B
Definition: ltc2983.h:178
int ltc2983_thermocouple_fault_handler(const uint32_t)
Fault handling of thermocouple sensors.
Definition: ltc2983.c:670
#define LTC2983_CHAN_RES_ADDR(chan)
Definition: ltc2983.h:77
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
@ LTC2983_THERMISTOR_44008_44032
Definition: ltc2983.h:193
#define LTC2983_RTD_CURVE(x)
Definition: ltc2983.h:122
Header file of Delay functions.
struct ltc2983_sensor sensor
Definition: ltc2983.h:352
#define LTC2983_CHAN_TYPE(x)
Definition: ltc2983.h:99
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
int ltc2983_common_fault_handler(const uint32_t result)
Fault handling of sensors other than thermocouple.
Definition: ltc2983.c:682
uint32_t mux_delay_config_us
Definition: ltc2983.h:234
diode sensor descriptor for LTC2983
Definition: ltc2983.h:350
int ltc2983_adc_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for direct ADC.
Definition: ltc2983.c:615
#define LTC2983_STATUS_UP(reg)
Definition: ltc2983.h:86
int ltc2983_chan_read_scale(struct ltc2983_desc *, const int, uint32_t *, uint32_t *)
Set scale of raw channel data / temperature.
Definition: ltc2983.c:406
int ltc2983_reg_write(struct ltc2983_desc *device, uint16_t reg_addr, uint8_t val)
Write raw register value.
Definition: ltc2983.c:182
int ltc2983_temp_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Definition: ltc2983.c:626
Definition: ad9361_util.h:69
#define LTC2983_NOTCH_FREQ_MASK
Definition: ltc2983.h:92
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
#define LTC2983_COMMON_HARD_FAULT_MASK
Definition: ltc2983.h:80
int ltc2983_chan_read_raw(struct ltc2983_desc *, const int, uint32_t *)
Read raw channel data / temperature.
Definition: ltc2983.c:354
#define to_adc(_sensor)
Definition: ltc2983.h:219
@ LTC2983_THERMISTOR_YSI_400
Definition: ltc2983.h:194
LTC2983 descriptor.
Definition: ltc2983.h:248
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 ltc2983_reg_write(struct ltc2983_desc *, uint16_t, uint8_t)
Write raw register value.
Definition: ltc2983.c:182
uint32_t sensor_config
Definition: ltc2983.h:312
int ltc2983_chan_read_scale(struct ltc2983_desc *device, const int chan, uint32_t *val, uint32_t *val2)
Set scale of raw channel data / temperature.
Definition: ltc2983.c:406
sense resistor descriptor for LTC2983
Definition: ltc2983.h:374
int ltc2983_diode_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for diode sensors.
Definition: ltc2983.c:574
common LTC2983 sensor struct
Definition: ltc2983.h:270
@ ID_LTC2983
Definition: ltc2983.h:152
#define to_rsense(_sensor)
Definition: ltc2983.h:216
uint32_t sensor_config
Definition: ltc2983.h:330
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
uint32_t ideal_factor_val_dec_1048576
Definition: ltc2983.h:344
@ LTC2983_THERMISTOR_44007_44034
Definition: ltc2983.h:191
int ltc2983_setup(struct ltc2983_desc *)
Device setup.
Definition: ltc2983.c:228
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
#define LTC2983_CHAN_START_ADDR(chan)
Definition: ltc2983.h:75
analog temperature sensor descriptor for LTC2983
Definition: ltc2983.h:394
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int ltc2983_reg_update_bits(struct ltc2983_desc *, uint16_t, uint8_t, uint8_t)
Update register value.
Definition: ltc2983.c:208
@ LTC2983_THERMOCOUPLE_J
Definition: ltc2983.h:171
struct r_sense_value r_sense_val
Definition: ltc2983.h:378
@ LTC2983_RSENSE
Definition: ltc2983.h:199
@ LTC2983_RTD_PT_100
Definition: ltc2983.h:182
struct ltc2983_sensor * sensors[20]
Definition: ltc2983.h:238
@ LTC2983_ACTIVE_TEMP
Definition: ltc2983.h:201
struct ltc2983_sensor sensor
Definition: ltc2983.h:294
struct ltc2983_sensor sensor
Definition: ltc2983.h:308
uint32_t sensor_config
Definition: ltc2983.h:354
uint32_t excitation_current
Definition: ltc2983.h:316
@ LTC2983_RTD_NI_120
Definition: ltc2983.h:187
void no_os_put_unaligned_be32(uint32_t val, uint8_t *buf)
ltc298x_id
Definition: ltc2983.h:151
@ LTC2983_60HZ_REJECTION
Definition: ltc2983.h:162
@ LTC2983_THERMISTOR_SPECTRUM_1003K
Definition: ltc2983.h:195
@ LTC2983_THERMOCOUPLE_T
Definition: ltc2983.h:177
struct no_os_spi_desc * comm_desc
Definition: ltc2983.h:250
int ltc2983_thermocouple_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for thermocouple sensors.
Definition: ltc2983.c:490
#define LTC2983_THERMISTOR_CFG(x)
Definition: ltc2983.h:125
int ltc2983_chan_read(struct ltc2983_desc *, const int, int *)
Read channel data / temperature.
Definition: ltc2983.c:324
int ltc2983_thermistor_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for thermistor sensors.
Definition: ltc2983.c:545
int ltc2983_init(struct ltc2983_desc **, struct ltc2983_init_param *)
Device and comm init function.
Definition: ltc2983.c:55
struct ltc2983_sensor sensor
Definition: ltc2983.h:326
#define LTC2983_MUX_CONFIG_REG
Definition: ltc2983.h:56
#define to_diode(_sensor)
Definition: ltc2983.h:213
int ltc2983_r_sense_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for rsense.
Definition: ltc2983.c:596
#define LTC2983_GLOBAL_CONFIG_REG
Definition: ltc2983.h:54
@ LTC2983_RTD_PT_1000
Definition: ltc2983.h:185
uint16_t custom_addr_ptr
Definition: ltc2983.h:262
#define LTC2983_THERMOCOUPLE_SOFT_FAULT_MASK
Definition: ltc2983.h:114
struct ltc2983_custom_sensor * custom
Definition: ltc2983.h:310
@ LTC2983_RTD_PT_200
Definition: ltc2983.h:183
thermistor sensor descriptor for LTC2983
Definition: ltc2983.h:324
bool is_steinhart
Definition: ltc2983.h:286
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int ltc2983_setup(struct ltc2983_desc *device)
Device setup.
Definition: ltc2983.c:228
int ltc2983_thermocouple_assign_chan(struct ltc2983_desc *device, const struct ltc2983_sensor *sensor)
Channel assignment for thermocouple sensors.
Definition: ltc2983.c:490
struct no_os_gpio_desc * gpio_rstn
Definition: ltc2983.h:252
uint32_t cold_junction_chan
Definition: ltc2983.h:300
#define LTC2983_RTD_EXC_CURRENT(x)
Definition: ltc2983.h:119
int ltc2983_reg_update_bits(struct ltc2983_desc *device, uint16_t reg_addr, uint8_t mask, uint8_t val)
Update register value.
Definition: ltc2983.c:208
#define LTC2983_COMMON_SOFT_FAULT_MASK
Definition: ltc2983.h:81
@ LTC2983_50_60HZ_REJECTION
Definition: ltc2983.h:161
#define to_thermistor(_sensor)
Definition: ltc2983.h:210
#define LTC2983_CUSTOM_ADDR(x)
Definition: ltc2983.h:108
bool single_ended
Definition: ltc2983.h:400
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define LTC2983_DIODE_IDEAL_FACTOR(x)
Definition: ltc2983.h:137
@ ID_LTC2986
Definition: ltc2983.h:154
int ltc2983_temp_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Definition: ltc2983.c:626
LTC2983 diode ideal factor value.
Definition: ltc2983.h:340
struct ltc2983_sensor sensor
Definition: ltc2983.h:386
uint32_t excitation_current
Definition: ltc2983.h:356
int ltc2983_reg_read(struct ltc2983_desc *device, uint16_t reg_addr, uint8_t *val)
Read raw register value.
Definition: ltc2983.c:156
#define LTC2983_RTD_CFG(x)
Definition: ltc2983.h:117
@ LTC2983_RTD_PT_500
Definition: ltc2983.h:184
uint32_t r_sense_chan
Definition: ltc2983.h:332
int ltc2983_adc_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for direct ADC.
Definition: ltc2983.c:615
#define to_temp(_sensor)
Definition: ltc2983.h:222
uint32_t * table
Definition: ltc2983.h:282
#define LTC2983_DIODE_EXC_CURRENT(x)
Definition: ltc2983.h:134
uint32_t r_sense_chan
Definition: ltc2983.h:314
struct ltc2983_custom_sensor * custom
Definition: ltc2983.h:398
thermocouple sensor descriptor for LTC2983
Definition: ltc2983.h:292
RTD sensor descriptor for LTC2983.
Definition: ltc2983.h:306
#define LTC2983_CHAN_ASSIGN(x)
Definition: ltc2983.h:102
#define LTC2983_ADC_SINGLE_ENDED(x)
Definition: ltc2983.h:144
uint8_t num_channels
Definition: ltc2983.h:258
bool single_ended
Definition: ltc2983.h:388
#define LTC2983_THERMISTOR_EXC_CURRENT(x)
Definition: ltc2983.h:128
@ LTC2983_THERMOCOUPLE_S
Definition: ltc2983.h:176
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
@ LTC2983_THERMOCOUPLE_R
Definition: ltc2983.h:175
int ltc2983_rtd_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for RTD sensors.
Definition: ltc2983.c:517
int ltc2983_diode_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for diode sensors.
Definition: ltc2983.c:574
int ltc2983_init(struct ltc2983_desc **device, struct ltc2983_init_param *init_param)
Device and comm init function.
Definition: ltc2983.c:55
custom LTC2983 sensor struct
Definition: ltc2983.h:280
uint32_t mux_delay_config_us
Definition: ltc2983.h:254
ltc2983_filter_notch_freq
Notch frequency of the digital filter.
Definition: ltc2983.h:160
int ltc2983_chan_read(struct ltc2983_desc *device, const int chan, int *val)
Read channel data / temperature.
Definition: ltc2983.c:324
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
uint32_t rtd_curve
Definition: ltc2983.h:318
struct no_os_spi_init_param spi_init
Definition: ltc2983.h:230
#define to_rtd(_sensor)
Definition: ltc2983.h:207
#define LTC2983_CUST_SENS_TBL_SIZE
Definition: ltc2983.h:61
uint32_t no_os_get_unaligned_be32(uint8_t *buf)
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
@ LTC2983_THERMISTOR_44006_44031
Definition: ltc2983.h:192
@ LTC2983_RTD_PT_50
Definition: ltc2983.h:181
@ LTC2983_DIODE
Definition: ltc2983.h:198
LTC2983 sense resistance value.
Definition: ltc2983.h:364
ltc2983_sensor_type
LTC2983 Sensor Type.
Definition: ltc2983.h:169
#define LTC2983_SPI_READ_BYTE
Definition: ltc2983.h:63
@ LTC2983_UNASSIGNED
Definition: ltc2983.h:170
@ LTC2983_THERMOCOUPLE_N
Definition: ltc2983.h:174
@ LTC2983_RTD_1000
Definition: ltc2983.h:186
int ltc2983_reg_read(struct ltc2983_desc *, uint16_t, uint8_t *)
Read raw register value.
Definition: ltc2983.c:156
LTC2983 init param.
Definition: ltc2983.h:228
#define LTC2983_SPI_WRITE_BYTE
Definition: ltc2983.h:64
int ltc2983_thermocouple_fault_handler(const uint32_t result)
Fault handling of thermocouple sensors.
Definition: ltc2983.c:670
uint8_t type
Definition: ltc2983.h:274
struct ltc2983_sensor sensor
Definition: ltc2983.h:396
uint8_t chan
Definition: ltc2983.h:272
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
struct ltc2983_custom_sensor * custom
Definition: ltc2983.h:328
int ltc2983_remove(struct ltc2983_desc *device)
Remove resources allocated by the init function.
Definition: ltc2983.c:130
direct ADC descriptor for LTC2983
Definition: ltc2983.h:384
Header file of GPIO Interface.
uint32_t sensor_config
Definition: ltc2983.h:298
struct ltc2983_custom_sensor * custom
Definition: ltc2983.h:296
@ LTC2983_THERMOCOUPLE_CUSTOM
Definition: ltc2983.h:179
size_t len
Definition: ltc2983.h:284
enum ltc2983_filter_notch_freq filter_notch_freq
Definition: ltc2983.h:256
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
#define to_thermocouple(_sensor)
Definition: ltc2983.h:204
Header file of utility functions.
enum ltc298x_id dev_type
Definition: ltc2983.h:242
#define LTC2983_CUSTOM_LEN(x)
Definition: ltc2983.h:105
int32_t no_os_sign_extend32(uint32_t value, int index)
uint16_t custom_addr_ptr
Definition: ltc2983.h:240
#define LTC2983_STATUS_START(x)
Definition: ltc2983.h:84
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
struct ltc2983_sensor sensor
Definition: ltc2983.h:376
#define LTC2983_DATA_MASK
Definition: ltc2983.h:96
@ LTC2983_THERMISTOR_44005_44030
Definition: ltc2983.h:190
int ltc2983_thermistor_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for thermistor sensors.
Definition: ltc2983.c:545
#define LTC2983_THERMOCOUPLE_CFG(x)
Definition: ltc2983.h:111
int ltc2983_chan_read_raw(struct ltc2983_desc *device, const int chan, uint32_t *val)
Read raw channel data / temperature.
Definition: ltc2983.c:354
#define LTC2983_STATUS_CHAN_SEL(x)
Definition: ltc2983.h:89
uint32_t ideal_factor_val_int
Definition: ltc2983.h:342
Error macro definition for ARM Compiler.
#define LTC2983_STATUS_REG
Definition: ltc2983.h:50
int ltc2983_r_sense_assign_chan(struct ltc2983_desc *, const struct ltc2983_sensor *)
Channel assignment for rsense.
Definition: ltc2983.c:596
int ltc2983_common_fault_handler(const uint32_t)
Fault handling of sensors other than thermocouple.
Definition: ltc2983.c:682
uint32_t excitation_current
Definition: ltc2983.h:334
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define LTC2983_R_SENSE_VAL(x)
Definition: ltc2983.h:141
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75