Loading...
Searching...
No Matches
max31865_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 David Picard
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
20
21#include "board.h"
22#include "saul_reg.h"
23
24#include "max31865.h"
25#include "max31865_internal.h"
26#include "max31865_lut.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36
40#ifndef MAX31865_PARAM_SPI
41# define MAX31865_PARAM_SPI (SPI_DEV(0))
42#endif
43
47#ifndef MAX31865_PARAM_CS_PIN
48# define MAX31865_PARAM_CS_PIN (GPIO_PIN(0, 5))
49#endif
50
54#ifndef MAX31865_PARAM_CFG_BYTE
55# define MAX31865_PARAM_CFG_BYTE MAX31865_CFG_VBIAS_ON | \
56 MAX31865_CFG_CONV_AUTO | \
57 MAX31865_CFG_3WIRE | \
58 MAX31865_CFG_FILTER_50HZ
59#endif
60
64#ifndef MAX31865_PARAM_TEMP_THRES_LOW
65# define MAX31865_PARAM_TEMP_THRES_LOW -19900
66#endif
67
71#ifndef MAX31865_PARAM_TEMP_THRES_HIGH
72# define MAX31865_PARAM_TEMP_THRES_HIGH 64900
73#endif
74
78#ifndef MAX31865_PARAMS
79# define MAX31865_PARAMS { \
80 .spi = MAX31865_PARAM_SPI, \
81 .cs_pin = MAX31865_PARAM_CS_PIN, \
82 .cfg_byte = MAX31865_PARAM_CFG_BYTE, \
83 .temp_low_threshold = MAX31865_PARAM_TEMP_THRES_LOW, \
84 .temp_high_threshold = MAX31865_PARAM_TEMP_THRES_HIGH, \
85 .lut = &max31865_lut, \
86 .lut_numlines = MAX31865_LUT_NUMLINES, \
87}
88#endif
92#ifndef MAX31865_SAUL_INFO
93#define MAX31865_SAUL_INFO { .name = "max31865_rtd" }
94#endif
96
101{
103};
104
112
113#ifdef __cplusplus
114}
115#endif
116
Internal addresses, registers and constants.
Default lookup table.
static const saul_reg_info_t max31865_saul_info[]
Allocate and configure entries to the SAUL registry.
static const max31865_params_t max31865_params[]
Configuration structs for the MAX31865 driver.
#define MAX31865_SAUL_INFO
Default SAUL info for the MAX31865 driver.
#define MAX31865_PARAMS
Default parameters for the MAX31865 driver.
SAUL registry interface definition.
Device initialization parameters.
Definition max31865.h:129
Additional data to collect for each entry.
Definition saul_reg.h:48