Loading...
Searching...
No Matches
max31855.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
35#ifndef MAX31855_H
36#define MAX31855_H
37
38/* Add header includes here */
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#include "periph/spi.h"
45
46/* Declare the API of the driver */
47
51typedef struct {
52 spi_t spi;
55
59typedef struct {
62
72
81
93
102void max31855_raw_to_data(uint32_t raw_data, max31855_data_t *data);
103
119
128void max31855_read_raw(max31855_t *dev, uint32_t *data);
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* MAX31855_H */
max31855_fault_t
Fault status of the MAX31855.
Definition max31855.h:66
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:70
@ MAX31855_FAULT_VCC_SHORT
VCC short-circuit.
Definition max31855.h:67
@ MAX31855_FAULT_GND_SHORT
GND short-circuit.
Definition max31855.h:68
@ MAX31855_FAULT_OPEN_CIRCUIT
Open circuit.
Definition max31855.h:69
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Definition spi.h:135
Low-level SPI peripheral driver interface definition.
Data structure for the MAX31855.
Definition max31855.h:76
int32_t internal_temperature
Internal temperature in centi degrees C.
Definition max31855.h:78
max31855_fault_t fault
Fault status.
Definition max31855.h:79
int32_t thermocouple_temperature
Thermocouple temperature in centi degrees C.
Definition max31855.h:77
Device initialization parameters.
Definition max31855.h:51
spi_t spi
SPI device.
Definition max31855.h:52
spi_cs_t cs_pin
Chip select pin.
Definition max31855.h:53
Device descriptor for the driver.
Definition max31855.h:59
const max31855_params_t * params
device configuration
Definition max31855.h:60