no-OS
Loading...
Searching...
No Matches
max31889.h File Reference

Temperature sensor functionalities. More...

#include <errno.h>
#include "no_os_i2c.h"
Include dependency graph for max31889.h:

Classes

struct  max31889_desc
 
struct  max31889_init_param
 

Macros

#define MAX31889_REG_STATUS   0x00
 
#define MAX31889_REG_INT_ENABLE   0x01
 
#define MAX31889_REG_FIFO_WRITE_PTR   0x04
 
#define MAX31889_REG_FIFO_READ_PTR   0x05
 
#define MAX31889_REG_OVERL_CNT   0x06
 
#define MAX31889_REG_DATA_CNT   0x07
 
#define MAX31889_REG_FIFO_DATA   0x08
 
#define MAX31889_REG_FIFO_CONFIG   0x09
 
#define MAX31889_REG_FIFO_CONFIG2   0x0A
 
#define MAX31889_REG_SYS_CNTRL   0x0C
 
#define MAX31889_REG_ALARM_HIGH_MSB   0x10
 
#define MAX31889_REG_ALARM_HIGH_LSB   0x11
 
#define MAX31889_REG_ALARM_LOW_MSB   0x12
 
#define MAX31889_REG_ALARM_LOW_LSB   0x13
 
#define MAX31889_REG_TEMP_SETUP   0x14
 
#define MAX31889_REG_GPIO_SETUP   0x20
 
#define MAX31889_REG_GPIO_CNTRL   0x21
 
#define MAX31889_REG_PART_ID   0xFF
 
#define MAX31889_MAX_CONV_STEPS   10
 
#define MAX31889_CONV_RATE   0.005
 
#define MAX31889_MEASUREMENT_TRIG_VALUE   0xC1
 
#define TEMP_MEAS_WAIT_UNTIL_ERROR_MS   1000
 

Functions

int32_t max31889_trig_conversion (struct max31889_desc *)
 
int32_t max31889_write_reg (struct max31889_desc *, uint8_t, uint8_t *, uint8_t)
 
int32_t max31889_read_reg (struct max31889_desc *, uint8_t, uint8_t *, uint8_t)
 
int32_t max31889_trig_and_read_temp (struct max31889_desc *, double *)
 
int32_t max31889_init (struct max31889_desc **, struct max31889_init_param *)
 
int32_t max31889_remove (struct max31889_desc *)
 

Detailed Description

Temperature sensor functionalities.

Author
Robert Budai (rober.nosp@m.t.bu.nosp@m.dai@a.nosp@m.nalo.nosp@m.g.com)

Copyright 2025(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ MAX31889_CONV_RATE

#define MAX31889_CONV_RATE   0.005

◆ MAX31889_MAX_CONV_STEPS

#define MAX31889_MAX_CONV_STEPS   10

◆ MAX31889_MEASUREMENT_TRIG_VALUE

#define MAX31889_MEASUREMENT_TRIG_VALUE   0xC1

◆ MAX31889_REG_ALARM_HIGH_LSB

#define MAX31889_REG_ALARM_HIGH_LSB   0x11

◆ MAX31889_REG_ALARM_HIGH_MSB

#define MAX31889_REG_ALARM_HIGH_MSB   0x10

◆ MAX31889_REG_ALARM_LOW_LSB

#define MAX31889_REG_ALARM_LOW_LSB   0x13

◆ MAX31889_REG_ALARM_LOW_MSB

#define MAX31889_REG_ALARM_LOW_MSB   0x12

◆ MAX31889_REG_DATA_CNT

#define MAX31889_REG_DATA_CNT   0x07

◆ MAX31889_REG_FIFO_CONFIG

#define MAX31889_REG_FIFO_CONFIG   0x09

◆ MAX31889_REG_FIFO_CONFIG2

#define MAX31889_REG_FIFO_CONFIG2   0x0A

◆ MAX31889_REG_FIFO_DATA

#define MAX31889_REG_FIFO_DATA   0x08

◆ MAX31889_REG_FIFO_READ_PTR

#define MAX31889_REG_FIFO_READ_PTR   0x05

◆ MAX31889_REG_FIFO_WRITE_PTR

#define MAX31889_REG_FIFO_WRITE_PTR   0x04

◆ MAX31889_REG_GPIO_CNTRL

#define MAX31889_REG_GPIO_CNTRL   0x21

◆ MAX31889_REG_GPIO_SETUP

#define MAX31889_REG_GPIO_SETUP   0x20

◆ MAX31889_REG_INT_ENABLE

#define MAX31889_REG_INT_ENABLE   0x01

◆ MAX31889_REG_OVERL_CNT

#define MAX31889_REG_OVERL_CNT   0x06

◆ MAX31889_REG_PART_ID

#define MAX31889_REG_PART_ID   0xFF

◆ MAX31889_REG_STATUS

#define MAX31889_REG_STATUS   0x00

◆ MAX31889_REG_SYS_CNTRL

#define MAX31889_REG_SYS_CNTRL   0x0C

◆ MAX31889_REG_TEMP_SETUP

#define MAX31889_REG_TEMP_SETUP   0x14

◆ TEMP_MEAS_WAIT_UNTIL_ERROR_MS

#define TEMP_MEAS_WAIT_UNTIL_ERROR_MS   1000

Function Documentation

◆ max31889_init()

int32_t max31889_init ( struct max31889_desc ** desc,
struct max31889_init_param * param )

◆ max31889_read_reg()

int32_t max31889_read_reg ( struct max31889_desc * desc,
uint8_t reg_addr,
uint8_t * data,
uint8_t length )

◆ max31889_remove()

int32_t max31889_remove ( struct max31889_desc * desc)

◆ max31889_trig_and_read_temp()

int32_t max31889_trig_and_read_temp ( struct max31889_desc * desc,
double * temperature )

◆ max31889_trig_conversion()

int32_t max31889_trig_conversion ( struct max31889_desc * desc)

◆ max31889_write_reg()

int32_t max31889_write_reg ( struct max31889_desc * desc,
uint8_t reg_addr,
uint8_t * data,
uint8_t length )