int max31865_init(max31865_t *dev, const max31865_params_t *params)
Initialize the given device.
int max31865_detect_fault(const max31865_t *dev, max31865_fault_t *flt_code)
Run an automatic fault-detection cycle.
void max31865_oneshot(const max31865_t *dev)
Start a one-shot conversion.
void max31865_switch_vbias(const max31865_t *dev, bool enable)
Switch VBIAS on or off.
int max31865_raw_to_data(const max31865_t *dev, uint16_t raw_data, int32_t *rtd_temperature_cdegc)
Convert the raw data from the MAX31865 temperature.
int max31865_read_raw(const max31865_t *dev, uint16_t *raw_data)
Read raw data from the MAX31865.
void max31865_clear_fault(const max31865_t *dev, uint8_t *config)
Clear the fault flag.
max31865_fault_t
Fault status of the MAX31865.
max31865_lutcols_t
Lookup table column indexes.
int max31865_read(const max31865_t *dev, int32_t *rtd_temperature_cdegc)
Read data from the MAX31865.
@ MAX31865_FAULT_NO_FAULT
No fault.
@ MAX31865_FAULT_CIRCUIT
Open or shorted circuit.
@ MAX31865_FAULT_RTD_HIGH
The RTD value is too high.
@ MAX31865_FAULT_RTD_LOW
The RTD value is too small.
@ MAX31865_FAULT_VOLTAGE
Overvoltage or undervoltage on the FORCE or RTD pin.
@ MAX31865_LUTCOL_A0
a0 coefficient column index
@ MAX31865_LUTCOL_TEMP
Temperature column index (µ°C)
@ MAX31865_LUTCOL_NUMOF
Number of columns in the lookup table.
@ MAX31865_LUTCOL_A1
a1 coefficient column index
@ MAX31865_LUTCOL_CODE
ADC code column index.
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Low-level SPI peripheral driver interface definition.
Device initialization parameters.
int32_t temp_high_threshold
High threshold temperature (c°C)
uint8_t cfg_byte
Initial value of the configuration register.
const int32_t(* lut)[][MAX31865_LUTCOL_NUMOF]
Lookup table.
spi_cs_t cs_pin
Chip select pin.
int32_t temp_low_threshold
Low threshold temperature (c°C)
const int lut_numlines
Number of lines in the lookup table.
Device descriptor for the driver.
const max31865_params_t * params
device configuration