LibDriver MAX31855
Loading...
Searching...
No Matches
max31855 base driver function

max31855 base driver modules More...

Collaboration diagram for max31855 base driver function:

Data Structures

struct  max31855_handle_s
 max31855 handle structure definition More...
struct  max31855_info_s
 max31855 information structure definition More...

Typedefs

typedef struct max31855_handle_s max31855_handle_t
 max31855 handle structure definition
typedef struct max31855_info_s max31855_info_t
 max31855 information structure definition

Enumerations

enum  max31855_fault_t { MAX31855_FAULT_NONE = 0x00 , MAX31855_FAULT_OC = (1 << 0) , MAX31855_FAULT_SCG = (1 << 1) , MAX31855_FAULT_SCV = (1 << 2) }
 max31855 fault enumeration definition More...

Functions

uint8_t max31855_info (max31855_info_t *info)
 get chip's information
uint8_t max31855_init (max31855_handle_t *handle)
 initialize the chip
uint8_t max31855_deinit (max31855_handle_t *handle)
 close the chip
uint8_t max31855_read (max31855_handle_t *handle, int16_t *thermocouple_raw, float *thermocouple_temp, int16_t *reference_junction_raw, float *reference_junction_temp)
 read the temperature
uint8_t max31855_get_last_fault (max31855_handle_t *handle, max31855_fault_t *fault)
 get the last fault

Detailed Description

max31855 base driver modules

Typedef Documentation

◆ max31855_handle_t

max31855 handle structure definition

◆ max31855_info_t

max31855 information structure definition

Enumeration Type Documentation

◆ max31855_fault_t

max31855 fault enumeration definition

Enumerator
MAX31855_FAULT_NONE 

none

MAX31855_FAULT_OC 

open, no connections

MAX31855_FAULT_SCG 

short-circuited to gnd

MAX31855_FAULT_SCV 

short-circuited to vcc

Definition at line 62 of file driver_max31855.h.

Function Documentation

◆ max31855_deinit()

uint8_t max31855_deinit ( max31855_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a max31855 handle structure
Returns
status code
  • 0 success
  • 1 deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 155 of file driver_max31855.c.

◆ max31855_get_last_fault()

uint8_t max31855_get_last_fault ( max31855_handle_t * handle,
max31855_fault_t * fault )

get the last fault

Parameters
[in]*handlepointer to a max31855 handle structure
[out]*faultpointer to a fault buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 190 of file driver_max31855.c.

◆ max31855_info()

uint8_t max31855_info ( max31855_info_t * info)

get chip's information

Parameters
[out]*infopointer to a max31855 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 309 of file driver_max31855.c.

◆ max31855_init()

uint8_t max31855_init ( max31855_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a max31855 handle structure
Returns
status code
  • 0 success
  • 1 spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 89 of file driver_max31855.c.

◆ max31855_read()

uint8_t max31855_read ( max31855_handle_t * handle,
int16_t * thermocouple_raw,
float * thermocouple_temp,
int16_t * reference_junction_raw,
float * reference_junction_temp )

read the temperature

Parameters
[in]*handlepointer to a max31855 handle structure
[out]*thermocouple_rawpointer to a thermocouple raw data buffer
[out]*thermocouple_temppointer to a thermocouple converted temperature buffer
[out]*reference_junction_rawpointer to a reference junction raw data buffer
[out]*reference_junction_temppointer to a reference junction converted temperature buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 find fault
Note
none

Definition at line 221 of file driver_max31855.c.