LibDriver MCP9600
Loading...
Searching...
No Matches
mcp9600 base driver function

mcp9600 base driver modules More...

Collaboration diagram for mcp9600 base driver function:

Data Structures

struct  mcp9600_handle_s
 mcp9600 handle structure definition More...
struct  mcp9600_info_s
 mcp9600 information structure definition More...

Typedefs

typedef struct mcp9600_handle_s mcp9600_handle_t
 mcp9600 handle structure definition
typedef struct mcp9600_info_s mcp9600_info_t
 mcp9600 information structure definition

Enumerations

enum  mcp9600_address_t { MCP9600_ADDRESS_0 = 0xC0 , MCP9600_ADDRESS_1 = 0xC2 }
 mcp9600 address enumeration definition More...
enum  mcp9600_cold_junction_resolution_t { MCP9600_COLD_JUNCTION_RESOLUTION_0P0625 = 0x00 , MCP9600_COLD_JUNCTION_RESOLUTION_0P25 = 0x01 }
 mcp9600 cold junction resolution enumeration definition More...
enum  mcp9600_adc_resolution_t { MCP9600_ADC_RESOLUTION_18_BIT = 0x00 , MCP9600_ADC_RESOLUTION_16_BIT = 0x01 , MCP9600_ADC_RESOLUTION_14_BIT = 0x02 , MCP9600_ADC_RESOLUTION_12_BIT = 0x03 }
 mcp9600 adc resolution enumeration definition More...
enum  mcp9600_burst_mode_sample_t {
  MCP9600_BURST_MODE_SAMPLE_1 = 0x00 , MCP9600_BURST_MODE_SAMPLE_2 = 0x01 , MCP9600_BURST_MODE_SAMPLE_4 = 0x02 , MCP9600_BURST_MODE_SAMPLE_8 = 0x03 ,
  MCP9600_BURST_MODE_SAMPLE_16 = 0x04 , MCP9600_BURST_MODE_SAMPLE_32 = 0x05 , MCP9600_BURST_MODE_SAMPLE_64 = 0x06 , MCP9600_BURST_MODE_SAMPLE_128 = 0x07
}
 mcp9600 burst mode sample enumeration definition More...
enum  mcp9600_mode_t { MCP9600_MODE_NORMAL = 0x00 , MCP9600_MODE_SHUTDOWN = 0x01 , MCP9600_MODE_BURST = 0x02 }
 mcp9600 mode enumeration definition More...
enum  mcp9600_thermocouple_type_t {
  MCP9600_THERMOCOUPLE_TYPE_K = 0x00 , MCP9600_THERMOCOUPLE_TYPE_J = 0x01 , MCP9600_THERMOCOUPLE_TYPE_T = 0x02 , MCP9600_THERMOCOUPLE_TYPE_N = 0x03 ,
  MCP9600_THERMOCOUPLE_TYPE_S = 0x04 , MCP9600_THERMOCOUPLE_TYPE_E = 0x05 , MCP9600_THERMOCOUPLE_TYPE_B = 0x06 , MCP9600_THERMOCOUPLE_TYPE_R = 0x07
}
 mcp9600 thermocouple type enumeration definition More...
enum  mcp9600_filter_coefficient_t {
  MCP9600_FILTER_COEFFICIENT_0 = 0x00 , MCP9600_FILTER_COEFFICIENT_1 = 0x01 , MCP9600_FILTER_COEFFICIENT_2 = 0x02 , MCP9600_FILTER_COEFFICIENT_3 = 0x03 ,
  MCP9600_FILTER_COEFFICIENT_4 = 0x04 , MCP9600_FILTER_COEFFICIENT_5 = 0x05 , MCP9600_FILTER_COEFFICIENT_6 = 0x06 , MCP9600_FILTER_COEFFICIENT_7 = 0x07
}
 mcp9600 filter coefficient enumeration definition More...
enum  mcp9600_alert_t { MCP9600_ALERT_1 = 0x00 , MCP9600_ALERT_2 = 0x01 , MCP9600_ALERT_3 = 0x02 , MCP9600_ALERT_4 = 0x03 }
 mcp9600 alert enumeration definition More...
enum  mcp9600_alert_status_t { MCP9600_ALERT_STATUS_LESS = 0x00 , MCP9600_ALERT_STATUS_OVER = 0x01 }
 mcp9600 alert status enumeration definition More...
enum  mcp9600_input_range_t { MCP9600_INPUT_RANGE_EXCEEDS = 0x01 , MCP9600_INPUT_RANGE_WITHIN = 0x00 }
 mcp9600 input range enumeration definition More...
enum  mcp9600_bool_t { MCP9600_BOOL_FALSE = 0x00 , MCP9600_BOOL_TRUE = 0x01 }
 mcp9600 bool enumeration definition More...
enum  mcp9600_temperature_maintain_detect_t { MCP9600_TEMPERATURE_MAINTAIN_DETECT_COLD_JUNCTION = 0x01 , MCP9600_TEMPERATURE_MAINTAIN_DETECT_HOT_JUNCTION = 0x00 }
 mcp9600 temperature maintain detect enumeration definition More...
enum  mcp9600_detect_edge_t { MCP9600_DETECT_EDGE_RISING = 0x00 , MCP9600_DETECT_EDGE_FALLING = 0x01 }
 mcp9600 detect edge enumeration definition More...
enum  mcp9600_active_level_t { MCP9600_ACTIVE_LEVEL_LOW = 0x00 , MCP9600_ACTIVE_LEVEL_HIGH = 0x01 }
 mcp9600 active level enumeration definition More...
enum  mcp9600_interrupt_mode_t { MCP9600_INTERRUPT_MODE_COMPARATOR = 0x00 , MCP9600_INTERRUPT_MODE_INTERRUPT = 0x01 }
 mcp9600 interrupt mode enumeration definition More...

Functions

uint8_t mcp9600_info (mcp9600_info_t *info)
 get chip information
uint8_t mcp9600_set_addr_pin (mcp9600_handle_t *handle, mcp9600_address_t addr_pin)
 set the iic address pin
uint8_t mcp9600_get_addr_pin (mcp9600_handle_t *handle, mcp9600_address_t *addr_pin)
 get the iic address pin
uint8_t mcp9600_init (mcp9600_handle_t *handle)
 initialize the chip
uint8_t mcp9600_deinit (mcp9600_handle_t *handle)
 close the chip
uint8_t mcp9600_start_continuous_read (mcp9600_handle_t *handle)
 start reading data
uint8_t mcp9600_stop_continuous_read (mcp9600_handle_t *handle)
 stop reading data
uint8_t mcp9600_continuous_read (mcp9600_handle_t *handle, int16_t *hot_raw, float *hot_s, int16_t *delta_raw, float *delta_s, int16_t *cold_raw, float *cold_s)
 read data continuously
uint8_t mcp9600_single_read (mcp9600_handle_t *handle, int16_t *hot_raw, float *hot_s, int16_t *delta_raw, float *delta_s, int16_t *cold_raw, float *cold_s)
 read data once
uint8_t mcp9600_get_hot_junction_temperature (mcp9600_handle_t *handle, int16_t *raw, float *s)
 get the hot junction temperature
uint8_t mcp9600_get_junction_thermocouple_delta (mcp9600_handle_t *handle, int16_t *raw, float *s)
 get the junction thermocouple delta
uint8_t mcp9600_get_cold_junction_temperature (mcp9600_handle_t *handle, int16_t *raw, float *s)
 get the cold junction temperature
uint8_t mcp9600_get_raw_adc (mcp9600_handle_t *handle, int32_t *raw, double *uv)
 get the raw adc
uint8_t mcp9600_set_filter_coefficient (mcp9600_handle_t *handle, mcp9600_filter_coefficient_t coefficient)
 set the filter coefficient
uint8_t mcp9600_get_filter_coefficient (mcp9600_handle_t *handle, mcp9600_filter_coefficient_t *coefficient)
 get the filter coefficient
uint8_t mcp9600_set_thermocouple_type (mcp9600_handle_t *handle, mcp9600_thermocouple_type_t type)
 set the thermocouple type
uint8_t mcp9600_get_thermocouple_type (mcp9600_handle_t *handle, mcp9600_thermocouple_type_t *type)
 get the thermocouple type
uint8_t mcp9600_get_status_burst_complete_flag (mcp9600_handle_t *handle, mcp9600_bool_t *status)
 get the burst complete status flag
uint8_t mcp9600_clear_status_burst_complete_flag (mcp9600_handle_t *handle)
 clear the burst complete status flag
uint8_t mcp9600_get_status_temperature_update_flag (mcp9600_handle_t *handle, mcp9600_bool_t *status)
 get the temperature update status flag
uint8_t mcp9600_clear_status_temperature_update_flag (mcp9600_handle_t *handle)
 clear the temperature update status flag
uint8_t mcp9600_get_status_input_range (mcp9600_handle_t *handle, mcp9600_input_range_t *range)
 get the input range status
uint8_t mcp9600_get_alert_status (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_alert_status_t *status)
 get the alert status
uint8_t mcp9600_set_cold_junction_resolution (mcp9600_handle_t *handle, mcp9600_cold_junction_resolution_t resolution)
 set the cold junction resolution
uint8_t mcp9600_get_cold_junction_resolution (mcp9600_handle_t *handle, mcp9600_cold_junction_resolution_t *resolution)
 get the cold junction resolution
uint8_t mcp9600_set_adc_resolution (mcp9600_handle_t *handle, mcp9600_adc_resolution_t resolution)
 set the adc resolution
uint8_t mcp9600_get_adc_resolution (mcp9600_handle_t *handle, mcp9600_adc_resolution_t *resolution)
 get the adc resolution
uint8_t mcp9600_set_burst_mode_sample (mcp9600_handle_t *handle, mcp9600_burst_mode_sample_t sample)
 set the burst mode sample
uint8_t mcp9600_get_burst_mode_sample (mcp9600_handle_t *handle, mcp9600_burst_mode_sample_t *sample)
 get the burst mode sample
uint8_t mcp9600_set_mode (mcp9600_handle_t *handle, mcp9600_mode_t mode)
 set the mode
uint8_t mcp9600_get_mode (mcp9600_handle_t *handle, mcp9600_mode_t *mode)
 get the mode
uint8_t mcp9600_alert_limit_convert_to_register (mcp9600_handle_t *handle, float c, int16_t *reg)
 convert the alert limit to the register raw data
uint8_t mcp9600_alert_limit_convert_to_data (mcp9600_handle_t *handle, int16_t reg, float *c)
 convert the register raw data to the alert limit
uint8_t mcp9600_set_alert_limit (mcp9600_handle_t *handle, mcp9600_alert_t alert, int16_t reg)
 set the alert limit
uint8_t mcp9600_get_alert_limit (mcp9600_handle_t *handle, mcp9600_alert_t alert, int16_t *reg)
 get the alert limit
uint8_t mcp9600_alert_hysteresis_convert_to_register (mcp9600_handle_t *handle, float c, uint8_t *reg)
 convert the alert hysteresis to the register raw data
uint8_t mcp9600_alert_hysteresis_convert_to_data (mcp9600_handle_t *handle, uint8_t reg, float *c)
 convert the register raw data to the alert hysteresis
uint8_t mcp9600_set_alert_hysteresis (mcp9600_handle_t *handle, mcp9600_alert_t alert, uint8_t reg)
 set the alert hysteresis
uint8_t mcp9600_get_alert_hysteresis (mcp9600_handle_t *handle, mcp9600_alert_t alert, uint8_t *reg)
 get the alert hysteresis
uint8_t mcp9600_clear_interrupt (mcp9600_handle_t *handle, mcp9600_alert_t alert)
 clear the interrupt flag
uint8_t mcp9600_get_interrupt (mcp9600_handle_t *handle, mcp9600_alert_t alert, uint8_t *status)
 get the interrupt flag
uint8_t mcp9600_set_temperature_maintain_detect (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_temperature_maintain_detect_t maintain_detect)
 set the temperature maintain detect
uint8_t mcp9600_get_temperature_maintain_detect (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_temperature_maintain_detect_t *maintain_detect)
 get the temperature maintain detect
uint8_t mcp9600_set_detect_edge (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_detect_edge_t edge)
 set the detect edge
uint8_t mcp9600_get_detect_edge (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_detect_edge_t *edge)
 get the detect edge
uint8_t mcp9600_set_active_level (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_active_level_t level)
 set the active level
uint8_t mcp9600_get_active_level (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_active_level_t *level)
 get the active level
uint8_t mcp9600_set_interrupt_mode (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_interrupt_mode_t mode)
 set the interrupt mode
uint8_t mcp9600_get_interrupt_mode (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_interrupt_mode_t *mode)
 get the interrupt mode
uint8_t mcp9600_set_alert_output (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_bool_t enable)
 set the alert output
uint8_t mcp9600_get_alert_output (mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_bool_t *enable)
 get the alert output
uint8_t mcp9600_get_device_id_revision (mcp9600_handle_t *handle, uint8_t *id, uint8_t *revision)
 get the device id and revision

Detailed Description

mcp9600 base driver modules

Typedef Documentation

◆ mcp9600_handle_t

mcp9600 handle structure definition

◆ mcp9600_info_t

mcp9600 information structure definition

Enumeration Type Documentation

◆ mcp9600_active_level_t

mcp9600 active level enumeration definition

Enumerator
MCP9600_ACTIVE_LEVEL_LOW 

active low

MCP9600_ACTIVE_LEVEL_HIGH 

active high

Definition at line 202 of file driver_mcp9600.h.

◆ mcp9600_adc_resolution_t

mcp9600 adc resolution enumeration definition

Enumerator
MCP9600_ADC_RESOLUTION_18_BIT 

18 bit resolution

MCP9600_ADC_RESOLUTION_16_BIT 

16 bit resolution

MCP9600_ADC_RESOLUTION_14_BIT 

14 bit resolution

MCP9600_ADC_RESOLUTION_12_BIT 

12 bit resolution

Definition at line 80 of file driver_mcp9600.h.

◆ mcp9600_address_t

mcp9600 address enumeration definition

Enumerator
MCP9600_ADDRESS_0 

addr pin connected to the GND

MCP9600_ADDRESS_1 

addr pin connected to the VCC

Definition at line 62 of file driver_mcp9600.h.

◆ mcp9600_alert_status_t

mcp9600 alert status enumeration definition

Enumerator
MCP9600_ALERT_STATUS_LESS 

less than threshold

MCP9600_ALERT_STATUS_OVER 

over threshold

Definition at line 157 of file driver_mcp9600.h.

◆ mcp9600_alert_t

mcp9600 alert enumeration definition

Enumerator
MCP9600_ALERT_1 

alert 1

MCP9600_ALERT_2 

alert 2

MCP9600_ALERT_3 

alert 3

MCP9600_ALERT_4 

alert 4

Definition at line 146 of file driver_mcp9600.h.

◆ mcp9600_bool_t

mcp9600 bool enumeration definition

Enumerator
MCP9600_BOOL_FALSE 

false

MCP9600_BOOL_TRUE 

true

Definition at line 175 of file driver_mcp9600.h.

◆ mcp9600_burst_mode_sample_t

mcp9600 burst mode sample enumeration definition

Enumerator
MCP9600_BURST_MODE_SAMPLE_1 

1 sample

MCP9600_BURST_MODE_SAMPLE_2 

2 sample

MCP9600_BURST_MODE_SAMPLE_4 

4 sample

MCP9600_BURST_MODE_SAMPLE_8 

8 sample

MCP9600_BURST_MODE_SAMPLE_16 

16 sample

MCP9600_BURST_MODE_SAMPLE_32 

32 sample

MCP9600_BURST_MODE_SAMPLE_64 

64 sample

MCP9600_BURST_MODE_SAMPLE_128 

128 sample

Definition at line 91 of file driver_mcp9600.h.

◆ mcp9600_cold_junction_resolution_t

mcp9600 cold junction resolution enumeration definition

Enumerator
MCP9600_COLD_JUNCTION_RESOLUTION_0P0625 

0.0625C

MCP9600_COLD_JUNCTION_RESOLUTION_0P25 

0.25C

Definition at line 71 of file driver_mcp9600.h.

◆ mcp9600_detect_edge_t

mcp9600 detect edge enumeration definition

Enumerator
MCP9600_DETECT_EDGE_RISING 

rising detect

MCP9600_DETECT_EDGE_FALLING 

falling detect

Definition at line 193 of file driver_mcp9600.h.

◆ mcp9600_filter_coefficient_t

mcp9600 filter coefficient enumeration definition

Enumerator
MCP9600_FILTER_COEFFICIENT_0 

filter off

MCP9600_FILTER_COEFFICIENT_1 

filter 1

MCP9600_FILTER_COEFFICIENT_2 

filter 2

MCP9600_FILTER_COEFFICIENT_3 

filter 3

MCP9600_FILTER_COEFFICIENT_4 

filter 4

MCP9600_FILTER_COEFFICIENT_5 

filter 5

MCP9600_FILTER_COEFFICIENT_6 

filter 6

MCP9600_FILTER_COEFFICIENT_7 

filter 7

Definition at line 131 of file driver_mcp9600.h.

◆ mcp9600_input_range_t

mcp9600 input range enumeration definition

Enumerator
MCP9600_INPUT_RANGE_EXCEEDS 

exceeds

MCP9600_INPUT_RANGE_WITHIN 

within

Definition at line 166 of file driver_mcp9600.h.

◆ mcp9600_interrupt_mode_t

mcp9600 interrupt mode enumeration definition

Enumerator
MCP9600_INTERRUPT_MODE_COMPARATOR 

comparator mode

MCP9600_INTERRUPT_MODE_INTERRUPT 

interrupt mode

Definition at line 211 of file driver_mcp9600.h.

◆ mcp9600_mode_t

mcp9600 mode enumeration definition

Enumerator
MCP9600_MODE_NORMAL 

normal mode

MCP9600_MODE_SHUTDOWN 

shutdown mode

MCP9600_MODE_BURST 

burst mode

Definition at line 106 of file driver_mcp9600.h.

◆ mcp9600_temperature_maintain_detect_t

mcp9600 temperature maintain detect enumeration definition

Enumerator
MCP9600_TEMPERATURE_MAINTAIN_DETECT_COLD_JUNCTION 

cold junction

MCP9600_TEMPERATURE_MAINTAIN_DETECT_HOT_JUNCTION 

hot junction

Definition at line 184 of file driver_mcp9600.h.

◆ mcp9600_thermocouple_type_t

mcp9600 thermocouple type enumeration definition

Enumerator
MCP9600_THERMOCOUPLE_TYPE_K 

type k

MCP9600_THERMOCOUPLE_TYPE_J 

type j

MCP9600_THERMOCOUPLE_TYPE_T 

type t

MCP9600_THERMOCOUPLE_TYPE_N 

type n

MCP9600_THERMOCOUPLE_TYPE_S 

type s

MCP9600_THERMOCOUPLE_TYPE_E 

type e

MCP9600_THERMOCOUPLE_TYPE_B 

type b

MCP9600_THERMOCOUPLE_TYPE_R 

type r

Definition at line 116 of file driver_mcp9600.h.

Function Documentation

◆ mcp9600_alert_hysteresis_convert_to_data()

uint8_t mcp9600_alert_hysteresis_convert_to_data ( mcp9600_handle_t * handle,
uint8_t reg,
float * c )

convert the register raw data to the alert hysteresis

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]regregister raw data
[out]*cpointer to an alert hysteresis buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1850 of file driver_mcp9600.c.

◆ mcp9600_alert_hysteresis_convert_to_register()

uint8_t mcp9600_alert_hysteresis_convert_to_register ( mcp9600_handle_t * handle,
float c,
uint8_t * reg )

convert the alert hysteresis to the register raw data

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]calert hysteresis
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1823 of file driver_mcp9600.c.

◆ mcp9600_alert_limit_convert_to_data()

uint8_t mcp9600_alert_limit_convert_to_data ( mcp9600_handle_t * handle,
int16_t reg,
float * c )

convert the register raw data to the alert limit

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]regregister raw data
[out]*cpointer to an alert limit buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1629 of file driver_mcp9600.c.

◆ mcp9600_alert_limit_convert_to_register()

uint8_t mcp9600_alert_limit_convert_to_register ( mcp9600_handle_t * handle,
float c,
int16_t * reg )

convert the alert limit to the register raw data

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]calert limit
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1602 of file driver_mcp9600.c.

◆ mcp9600_clear_interrupt()

uint8_t mcp9600_clear_interrupt ( mcp9600_handle_t * handle,
mcp9600_alert_t alert )

clear the interrupt flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
Returns
status code
  • 0 success
  • 1 clear interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2044 of file driver_mcp9600.c.

◆ mcp9600_clear_status_burst_complete_flag()

uint8_t mcp9600_clear_status_burst_complete_flag ( mcp9600_handle_t * handle)

clear the burst complete status flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 clear status burst complete flag failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 671 of file driver_mcp9600.c.

◆ mcp9600_clear_status_temperature_update_flag()

uint8_t mcp9600_clear_status_temperature_update_flag ( mcp9600_handle_t * handle)

clear the temperature update status flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 clear status temperature update flag failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 752 of file driver_mcp9600.c.

◆ mcp9600_continuous_read()

uint8_t mcp9600_continuous_read ( mcp9600_handle_t * handle,
int16_t * hot_raw,
float * hot_s,
int16_t * delta_raw,
float * delta_s,
int16_t * cold_raw,
float * cold_s )

read data continuously

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*hot_rawpointer to a raw hot temperature buffer
[out]*hot_spointer to a converted hot temperature buffer
[out]*delta_rawpointer to a raw delta temperature buffer
[out]*delta_spointer to a converted delta temperature buffer
[out]*cold_rawpointer to a raw cold temperature buffer
[out]*cold_spointer to a converted cold temperature buffer
Returns
status code
  • 0 success
  • 1 continuous read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
this function can be used only after run mcp9600_start_continuous_read and can be stopped by mcp9600_stop_continuous_read

Definition at line 422 of file driver_mcp9600.c.

◆ mcp9600_deinit()

uint8_t mcp9600_deinit ( mcp9600_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 272 of file driver_mcp9600.c.

◆ mcp9600_get_active_level()

uint8_t mcp9600_get_active_level ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_active_level_t * level )

get the active level

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*levelpointer to an active level buffer
Returns
status code
  • 0 success
  • 1 get active level failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2659 of file driver_mcp9600.c.

◆ mcp9600_get_adc_resolution()

uint8_t mcp9600_get_adc_resolution ( mcp9600_handle_t * handle,
mcp9600_adc_resolution_t * resolution )

get the adc resolution

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*resolutionpointer to an adc resolution buffer
Returns
status code
  • 0 success
  • 1 get adc resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1230 of file driver_mcp9600.c.

◆ mcp9600_get_addr_pin()

uint8_t mcp9600_get_addr_pin ( mcp9600_handle_t * handle,
mcp9600_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 166 of file driver_mcp9600.c.

◆ mcp9600_get_alert_hysteresis()

uint8_t mcp9600_get_alert_hysteresis ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
uint8_t * reg )

get the alert hysteresis

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*regpointer to a register value buffer
Returns
status code
  • 0 success
  • 1 get alert hysteresis failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 1962 of file driver_mcp9600.c.

◆ mcp9600_get_alert_limit()

uint8_t mcp9600_get_alert_limit ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
int16_t * reg )

get the alert limit

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*regpointer to a register value buffer
Returns
status code
  • 0 success
  • 1 get alert limit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 1742 of file driver_mcp9600.c.

◆ mcp9600_get_alert_output()

uint8_t mcp9600_get_alert_output ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_bool_t * enable )

get the alert output

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get alert output failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 3007 of file driver_mcp9600.c.

◆ mcp9600_get_alert_status()

uint8_t mcp9600_get_alert_status ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_alert_status_t * status )

get the alert status

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*statuspointer to an alert status buffer
Returns
status code
  • 0 success
  • 1 get alert status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 835 of file driver_mcp9600.c.

◆ mcp9600_get_burst_mode_sample()

uint8_t mcp9600_get_burst_mode_sample ( mcp9600_handle_t * handle,
mcp9600_burst_mode_sample_t * sample )

get the burst mode sample

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*samplepointer to a burst mode sample buffer
Returns
status code
  • 0 success
  • 1 get burst mode sample failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1314 of file driver_mcp9600.c.

◆ mcp9600_get_cold_junction_resolution()

uint8_t mcp9600_get_cold_junction_resolution ( mcp9600_handle_t * handle,
mcp9600_cold_junction_resolution_t * resolution )

get the cold junction resolution

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*resolutionpointer to a cold junction resolution buffer
Returns
status code
  • 0 success
  • 1 get cold junction resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1146 of file driver_mcp9600.c.

◆ mcp9600_get_cold_junction_temperature()

uint8_t mcp9600_get_cold_junction_temperature ( mcp9600_handle_t * handle,
int16_t * raw,
float * s )

get the cold junction temperature

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*spointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 get cold junction temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 954 of file driver_mcp9600.c.

◆ mcp9600_get_detect_edge()

uint8_t mcp9600_get_detect_edge ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_detect_edge_t * edge )

get the detect edge

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*edgepointer to a detect edge buffer
Returns
status code
  • 0 success
  • 1 get detect edge failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2485 of file driver_mcp9600.c.

◆ mcp9600_get_device_id_revision()

uint8_t mcp9600_get_device_id_revision ( mcp9600_handle_t * handle,
uint8_t * id,
uint8_t * revision )

get the device id and revision

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*idpointer to an id buffer
[out]*revisionpointer to a revision buffer
Returns
status code
  • 0 success
  • 1 get device id revision failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 3089 of file driver_mcp9600.c.

◆ mcp9600_get_filter_coefficient()

uint8_t mcp9600_get_filter_coefficient ( mcp9600_handle_t * handle,
mcp9600_filter_coefficient_t * coefficient )

get the filter coefficient

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*coefficientpointer to a filter coefficient buffer
Returns
status code
  • 0 success
  • 1 get filter coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1565 of file driver_mcp9600.c.

◆ mcp9600_get_hot_junction_temperature()

uint8_t mcp9600_get_hot_junction_temperature ( mcp9600_handle_t * handle,
int16_t * raw,
float * s )

get the hot junction temperature

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*spointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 get hot junction temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 874 of file driver_mcp9600.c.

◆ mcp9600_get_interrupt()

uint8_t mcp9600_get_interrupt ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
uint8_t * status )

get the interrupt flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2135 of file driver_mcp9600.c.

◆ mcp9600_get_interrupt_mode()

uint8_t mcp9600_get_interrupt_mode ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_interrupt_mode_t * mode )

get the interrupt mode

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*modepointer to an interrupt mode buffer
Returns
status code
  • 0 success
  • 1 get interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2833 of file driver_mcp9600.c.

◆ mcp9600_get_junction_thermocouple_delta()

uint8_t mcp9600_get_junction_thermocouple_delta ( mcp9600_handle_t * handle,
int16_t * raw,
float * s )

get the junction thermocouple delta

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*spointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 get junction thermocouple delta failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 914 of file driver_mcp9600.c.

◆ mcp9600_get_mode()

uint8_t mcp9600_get_mode ( mcp9600_handle_t * handle,
mcp9600_mode_t * mode )

get the mode

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1398 of file driver_mcp9600.c.

◆ mcp9600_get_raw_adc()

uint8_t mcp9600_get_raw_adc ( mcp9600_handle_t * handle,
int32_t * raw,
double * uv )

get the raw adc

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*rawpointer to a raw adc buffer
[out]*uvpointer to a converted voltage buffer
Returns
status code
  • 0 success
  • 1 get raw adc failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1010 of file driver_mcp9600.c.

◆ mcp9600_get_status_burst_complete_flag()

uint8_t mcp9600_get_status_burst_complete_flag ( mcp9600_handle_t * handle,
mcp9600_bool_t * status )

get the burst complete status flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status burst complete flag failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 634 of file driver_mcp9600.c.

◆ mcp9600_get_status_input_range()

uint8_t mcp9600_get_status_input_range ( mcp9600_handle_t * handle,
mcp9600_input_range_t * range )

get the input range status

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*rangepointer to an input range buffer
Returns
status code
  • 0 success
  • 1 get status input range failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 796 of file driver_mcp9600.c.

◆ mcp9600_get_status_temperature_update_flag()

uint8_t mcp9600_get_status_temperature_update_flag ( mcp9600_handle_t * handle,
mcp9600_bool_t * status )

get the temperature update status flag

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status temperature update flag failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 715 of file driver_mcp9600.c.

◆ mcp9600_get_temperature_maintain_detect()

uint8_t mcp9600_get_temperature_maintain_detect ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_temperature_maintain_detect_t * maintain_detect )

get the temperature maintain detect

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[out]*maintain_detectpointer to a temperature maintain detect buffer
Returns
status code
  • 0 success
  • 1 get temperature maintain detect failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2310 of file driver_mcp9600.c.

◆ mcp9600_get_thermocouple_type()

uint8_t mcp9600_get_thermocouple_type ( mcp9600_handle_t * handle,
mcp9600_thermocouple_type_t * type )

get the thermocouple type

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*typepointer to a thermocouple type buffer
Returns
status code
  • 0 success
  • 1 get thermocouple type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1482 of file driver_mcp9600.c.

◆ mcp9600_info()

uint8_t mcp9600_info ( mcp9600_info_t * info)

get chip information

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

Definition at line 3178 of file driver_mcp9600.c.

◆ mcp9600_init()

uint8_t mcp9600_init ( mcp9600_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is invalid
Note
none

Definition at line 189 of file driver_mcp9600.c.

◆ mcp9600_set_active_level()

uint8_t mcp9600_set_active_level ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_active_level_t level )

set the active level

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]levelactive level
Returns
status code
  • 0 success
  • 1 set active level failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2568 of file driver_mcp9600.c.

◆ mcp9600_set_adc_resolution()

uint8_t mcp9600_set_adc_resolution ( mcp9600_handle_t * handle,
mcp9600_adc_resolution_t resolution )

set the adc resolution

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]resolutionadc resolution
Returns
status code
  • 0 success
  • 1 set adc resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1184 of file driver_mcp9600.c.

◆ mcp9600_set_addr_pin()

uint8_t mcp9600_set_addr_pin ( mcp9600_handle_t * handle,
mcp9600_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 145 of file driver_mcp9600.c.

◆ mcp9600_set_alert_hysteresis()

uint8_t mcp9600_set_alert_hysteresis ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
uint8_t reg )

set the alert hysteresis

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]regregister value
Returns
status code
  • 0 success
  • 1 set alert hysteresis failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 1879 of file driver_mcp9600.c.

◆ mcp9600_set_alert_limit()

uint8_t mcp9600_set_alert_limit ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
int16_t reg )

set the alert limit

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]regregister value
Returns
status code
  • 0 success
  • 1 set alert limit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 1658 of file driver_mcp9600.c.

◆ mcp9600_set_alert_output()

uint8_t mcp9600_set_alert_output ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_bool_t enable )

set the alert output

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set alert output failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2916 of file driver_mcp9600.c.

◆ mcp9600_set_burst_mode_sample()

uint8_t mcp9600_set_burst_mode_sample ( mcp9600_handle_t * handle,
mcp9600_burst_mode_sample_t sample )

set the burst mode sample

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]sampleburst mode sample
Returns
status code
  • 0 success
  • 1 set burst mode sample failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1268 of file driver_mcp9600.c.

◆ mcp9600_set_cold_junction_resolution()

uint8_t mcp9600_set_cold_junction_resolution ( mcp9600_handle_t * handle,
mcp9600_cold_junction_resolution_t resolution )

set the cold junction resolution

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]resolutioncold junction resolution
Returns
status code
  • 0 success
  • 1 set cold junction resolution failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1100 of file driver_mcp9600.c.

◆ mcp9600_set_detect_edge()

uint8_t mcp9600_set_detect_edge ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_detect_edge_t edge )

set the detect edge

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]edgedetect edge
Returns
status code
  • 0 success
  • 1 set detect edge failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2394 of file driver_mcp9600.c.

◆ mcp9600_set_filter_coefficient()

uint8_t mcp9600_set_filter_coefficient ( mcp9600_handle_t * handle,
mcp9600_filter_coefficient_t coefficient )

set the filter coefficient

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]coefficientfilter coefficient
Returns
status code
  • 0 success
  • 1 set filter coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1519 of file driver_mcp9600.c.

◆ mcp9600_set_interrupt_mode()

uint8_t mcp9600_set_interrupt_mode ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_interrupt_mode_t mode )

set the interrupt mode

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]modeinterrupt mode
Returns
status code
  • 0 success
  • 1 set interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2742 of file driver_mcp9600.c.

◆ mcp9600_set_mode()

uint8_t mcp9600_set_mode ( mcp9600_handle_t * handle,
mcp9600_mode_t mode )

set the mode

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1352 of file driver_mcp9600.c.

◆ mcp9600_set_temperature_maintain_detect()

uint8_t mcp9600_set_temperature_maintain_detect ( mcp9600_handle_t * handle,
mcp9600_alert_t alert,
mcp9600_temperature_maintain_detect_t maintain_detect )

set the temperature maintain detect

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]alertalert number
[in]maintain_detecttemperature maintain detect
Returns
status code
  • 0 success
  • 1 set temperature maintain detect failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 alert is invalid
Note
none

Definition at line 2218 of file driver_mcp9600.c.

◆ mcp9600_set_thermocouple_type()

uint8_t mcp9600_set_thermocouple_type ( mcp9600_handle_t * handle,
mcp9600_thermocouple_type_t type )

set the thermocouple type

Parameters
[in]*handlepointer to an mcp9600 handle structure
[in]typethermocouple type
Returns
status code
  • 0 success
  • 1 set thermocouple type failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1436 of file driver_mcp9600.c.

◆ mcp9600_single_read()

uint8_t mcp9600_single_read ( mcp9600_handle_t * handle,
int16_t * hot_raw,
float * hot_s,
int16_t * delta_raw,
float * delta_s,
int16_t * cold_raw,
float * cold_s )

read data once

Parameters
[in]*handlepointer to an mcp9600 handle structure
[out]*hot_rawpointer to a raw hot temperature buffer
[out]*hot_spointer to a converted hot temperature buffer
[out]*delta_rawpointer to a raw delta temperature buffer
[out]*delta_spointer to a converted delta temperature buffer
[out]*cold_rawpointer to a raw cold temperature buffer
[out]*cold_spointer to a converted cold temperature buffer
Returns
status code
  • 0 success
  • 1 single read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 read timeout
Note
none

Definition at line 502 of file driver_mcp9600.c.

◆ mcp9600_start_continuous_read()

uint8_t mcp9600_start_continuous_read ( mcp9600_handle_t * handle)

start reading data

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 start continuous read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 325 of file driver_mcp9600.c.

◆ mcp9600_stop_continuous_read()

uint8_t mcp9600_stop_continuous_read ( mcp9600_handle_t * handle)

stop reading data

Parameters
[in]*handlepointer to an mcp9600 handle structure
Returns
status code
  • 0 success
  • 1 stop continuous read failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 370 of file driver_mcp9600.c.