Loading...
Searching...
No Matches
max31855.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
33
34/* Add header includes here */
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#include "periph/spi.h"
41
42/* Declare the API of the driver */
43
47typedef struct {
48 spi_t spi;
51
55typedef struct {
58
68
77
89
98void max31855_raw_to_data(uint32_t raw_data, max31855_data_t *data);
99
115
124void max31855_read_raw(max31855_t *dev, uint32_t *data);
125
126#ifdef __cplusplus
127}
128#endif
129
max31855_fault_t
Fault status of the MAX31855.
Definition max31855.h:62
void max31855_read_raw(max31855_t *dev, uint32_t *data)
Read raw data from the MAX31855.
void max31855_raw_to_data(uint32_t raw_data, max31855_data_t *data)
Parse the raw data from the MAX31855 to the data structure.
int max31855_read(max31855_t *dev, max31855_data_t *data)
Read data from the MAX31855.
int max31855_init(max31855_t *dev, const max31855_params_t *params)
Initialize the given device.
@ MAX31855_FAULT_NO_FAULT
No fault.
Definition max31855.h:66
@ MAX31855_FAULT_VCC_SHORT
VCC short-circuit.
Definition max31855.h:63
@ MAX31855_FAULT_GND_SHORT
GND short-circuit.
Definition max31855.h:64
@ MAX31855_FAULT_OPEN_CIRCUIT
Open circuit.
Definition max31855.h:65
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Definition spi.h:157
Low-level SPI peripheral driver interface definition.
Data structure for the MAX31855.
Definition max31855.h:72
int32_t internal_temperature
Internal temperature in centi degrees C.
Definition max31855.h:74
max31855_fault_t fault
Fault status.
Definition max31855.h:75
int32_t thermocouple_temperature
Thermocouple temperature in centi degrees C.
Definition max31855.h:73
Device initialization parameters.
Definition max31855.h:47
spi_t spi
SPI device.
Definition max31855.h:48
spi_cs_t cs_pin
Chip select pin.
Definition max31855.h:49
Device descriptor for the driver.
Definition max31855.h:55
const max31855_params_t * params
device configuration
Definition max31855.h:56