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
9#pragma once
10
36
37/* Add header includes here */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include "periph/spi.h"
44
45/* Declare the API of the driver */
46
50typedef struct {
51 spi_t spi;
54
58typedef struct {
61
71
80
92
101void max31855_raw_to_data(uint32_t raw_data, max31855_data_t *data);
102
118
127void max31855_read_raw(max31855_t *dev, uint32_t *data);
128
129#ifdef __cplusplus
130}
131#endif
132
max31855_fault_t
Fault status of the MAX31855.
Definition max31855.h:65
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:69
@ MAX31855_FAULT_VCC_SHORT
VCC short-circuit.
Definition max31855.h:66
@ MAX31855_FAULT_GND_SHORT
GND short-circuit.
Definition max31855.h:67
@ MAX31855_FAULT_OPEN_CIRCUIT
Open circuit.
Definition max31855.h:68
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:75
int32_t internal_temperature
Internal temperature in centi degrees C.
Definition max31855.h:77
max31855_fault_t fault
Fault status.
Definition max31855.h:78
int32_t thermocouple_temperature
Thermocouple temperature in centi degrees C.
Definition max31855.h:76
Device initialization parameters.
Definition max31855.h:50
spi_t spi
SPI device.
Definition max31855.h:51
spi_cs_t cs_pin
Chip select pin.
Definition max31855.h:52
Device descriptor for the driver.
Definition max31855.h:58
const max31855_params_t * params
device configuration
Definition max31855.h:59