#include <stdint.h>
#include "no_os_spi.h"
#include "no_os_util.h"
Go to the source code of this file.
◆ MAX31855_GET_FAULT_BIT
#define MAX31855_GET_FAULT_BIT |
( |
| x | ) |
|
Value:
#define NO_OS_BIT(x)
Definition no_os_util.h:39
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
◆ MAX31855_GET_FAULTS
#define MAX31855_GET_FAULTS |
( |
| x | ) |
|
Value:
#define NO_OS_GENMASK(h, l)
Definition no_os_util.h:76
◆ MAX31855_GET_INTERNAL_TEMP
#define MAX31855_GET_INTERNAL_TEMP |
( |
| x | ) |
|
◆ MAX31855_GET_THERMOCOUPLE_TEMP
#define MAX31855_GET_THERMOCOUPLE_TEMP |
( |
| x | ) |
|
◆ MAX31855_INTERNAL_TEMP_DEC_DIV
#define MAX31855_INTERNAL_TEMP_DEC_DIV 16 |
◆ MAX31855_INTERNAL_TEMP_SIGN_POS
#define MAX31855_INTERNAL_TEMP_SIGN_POS 11 |
◆ MAX31855_THERMOCOUPLE_TEMP_DEC_DIV
#define MAX31855_THERMOCOUPLE_TEMP_DEC_DIV 4 |
Decimal resolution for the 2 temperatures (0.25 C and 0.0625 C / LSB). integer_temp = raw_temp / dec_div.
◆ MAX31855_THERMOCOUPLE_TEMP_SIGN_POS
#define MAX31855_THERMOCOUPLE_TEMP_SIGN_POS 13 |
◆ max31855_init()
Device and comm init function.
Device and comm init function
- Parameters
-
device | - MAX31855 descriptor to be initialized |
init_param | - Init parameter for descriptor |
- Returns
- 0 in case of success, errno errors otherwise
◆ max31855_read_raw()
int max31855_read_raw |
( |
struct max31855_dev * | device, |
|
|
uint32_t * | val ) |
Read raw register value.
Read raw register value
- Parameters
-
device | - MAX31855 descriptor |
val | - register value |
- Returns
- 0 in case of success, negative error code otherwise
◆ max31855_read_temp()
Read thermocouple and internal temperatures (converted in deg. C)
Read thermocouple and internal temperatures (converted in deg. C)
- Parameters
-
device | - MAX31855 descriptor |
thermocouple_temp | - thermocouple probe temperature (deg. C) |
internal_temp | - board's temperature (used as reference) |
- Returns
- 0 in case of success, errno errors otherwise
◆ max31855_remove()
Remove resources allocated by the init function.
Free resources allocated by the init function
- Parameters
-
device | - MAX31855 descriptor |
- Returns
- 0 in case of success, errno errors otherwise