42#define CHIP_NAME "Microchip MCP9600"
43#define MANUFACTURER_NAME "Microchip"
44#define SUPPLY_VOLTAGE_MIN 2.7f
45#define SUPPLY_VOLTAGE_MAX 5.5f
46#define MAX_CURRENT 2.5f
47#define TEMPERATURE_MIN -40.0f
48#define TEMPERATURE_MAX 125.0f
49#define DRIVER_VERSION 1000
54#define MCP9600_REG_THERMOCOUPLE_HOT_JUNCTION 0x00
55#define MCP9600_REG_JUNCTIONS_TEMPERATURE_DELTA 0x01
56#define MCP9600_REG_COLD_JUNCTION_TEMPERATURE 0x02
57#define MCP9600_REG_RAW_ADC_DATA 0x03
58#define MCP9600_REG_STATUS 0x04
59#define MCP9600_REG_THERMOCOUPLE_SENSOR_CONFIGURATION 0x05
60#define MCP9600_REG_DEVICE_CONFIGURATION 0x06
61#define MCP9600_REG_ALERT1_CONFIGURATION 0x08
62#define MCP9600_REG_ALERT2_CONFIGURATION 0x09
63#define MCP9600_REG_ALERT3_CONFIGURATION 0x0A
64#define MCP9600_REG_ALERT4_CONFIGURATION 0x0B
65#define MCP9600_REG_ALERT1_HYSTERESIS 0x0C
66#define MCP9600_REG_ALERT2_HYSTERESIS 0x0D
67#define MCP9600_REG_ALERT3_HYSTERESIS 0x0E
68#define MCP9600_REG_ALERT4_HYSTERESIS 0x0F
69#define MCP9600_REG_TEMPERATURE_ALERT1_LIMIT 0x10
70#define MCP9600_REG_TEMPERATURE_ALERT2_LIMIT 0x11
71#define MCP9600_REG_TEMPERATURE_ALERT3_LIMIT 0x12
72#define MCP9600_REG_TEMPERATURE_ALERT4_LIMIT 0x13
73#define MCP9600_REG_DEVICE_ID_REVISON 0x20
86static uint8_t a_mcp9600_iic_read(
mcp9600_handle_t *handle, uint8_t reg, uint8_t *data, uint16_t len)
114static uint8_t a_mcp9600_iic_write(
mcp9600_handle_t *handle, uint8_t reg, uint8_t *data, uint16_t len)
124 for (i = 0; i < len; i++)
126 buf[1 + i] = data[i];
152 handle->
iic_addr = (uint8_t)addr_pin;
204 handle->
debug_print(
"mcp9600: iic_init is null.\n");
210 handle->
debug_print(
"mcp9600: iic_deinit is null.\n");
216 handle->
debug_print(
"mcp9600: iic_read_cmd is null.\n");
222 handle->
debug_print(
"mcp9600: iic_write_cmd is null.\n");
228 handle->
debug_print(
"mcp9600: delay_ms is null.\n");
235 handle->
debug_print(
"mcp9600: iic init failed.\n");
239 memset(buf, 0,
sizeof(uint8_t) * 2);
244 handle->
debug_print(
"mcp9600: read device id failed.\n");
289 handle->
debug_print(
"mcp9600: power down failed.\n");
299 handle->
debug_print(
"mcp9600: power down failed.\n");
306 handle->
debug_print(
"mcp9600: iic deinit failed.\n");
342 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
352 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
387 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
397 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
423 int16_t *delta_raw,
float *delta_s, int16_t *cold_raw,
float *cold_s)
441 handle->
debug_print(
"mcp9600: read hot junction temperature failed.\n");
445 *hot_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
446 *hot_s = (float)(*hot_raw) / 16.0f;
451 handle->
debug_print(
"mcp9600: read junction thermocouple delta failed.\n");
455 *delta_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
456 *delta_s = (float)(*delta_raw) / 16.0f;
461 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
468 handle->
debug_print(
"mcp9600: read cold junction temperature failed.\n");
472 *cold_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
473 if (((reg >> 7) & 0x01) != 0)
475 *cold_s = (float)(*cold_raw) / 16.0f;
479 *cold_s = (float)(*cold_raw) / 4.0f;
503 int16_t *delta_raw,
float *delta_s, int16_t *cold_raw,
float *cold_s)
522 handle->
debug_print(
"mcp9600: read status failed.\n");
531 handle->
debug_print(
"mcp9600: write status failed.\n");
539 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
548 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
558 handle->
debug_print(
"mcp9600: read status failed.\n");
562 if ((reg & 0xC0) == 0xC0)
579 handle->
debug_print(
"mcp9600: read hot junction temperature failed.\n");
583 *hot_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
584 *hot_s = (float)(*hot_raw) / 16.0f;
589 handle->
debug_print(
"mcp9600: read junction thermocouple delta failed.\n");
593 *delta_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
594 *delta_s = (float)(*delta_raw) / 16.0f;
599 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
606 handle->
debug_print(
"mcp9600: read cold junction temperature failed.\n");
610 *cold_raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
611 if (((reg >> 7) & 0x01) != 0)
613 *cold_s = (float)(*cold_raw) / 16.0f;
617 *cold_s = (float)(*cold_raw) / 4.0f;
651 handle->
debug_print(
"mcp9600: read status failed.\n");
688 handle->
debug_print(
"mcp9600: read status failed.\n");
696 handle->
debug_print(
"mcp9600: write status failed.\n");
732 handle->
debug_print(
"mcp9600: read status failed.\n");
769 handle->
debug_print(
"mcp9600: read status failed.\n");
777 handle->
debug_print(
"mcp9600: write status failed.\n");
813 handle->
debug_print(
"mcp9600: read status failed.\n");
852 handle->
debug_print(
"mcp9600: read status failed.\n");
891 handle->
debug_print(
"mcp9600: read hot junction temperature failed.\n");
896 *raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
897 *s = (float)(*raw) / 16.0f;
931 handle->
debug_print(
"mcp9600: read junction thermocouple delta failed.\n");
936 *raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
937 *s = (float)(*raw) / 16.0f;
972 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
980 handle->
debug_print(
"mcp9600: read cold junction temperature failed.\n");
985 *raw = (int16_t)(((uint16_t)buf[0] << 8) | buf[1]);
986 if (((reg >> 7) & 0x01) != 0)
988 *s = (float)(*raw) / 16.0f;
992 *s = (float)(*raw) / 4.0f;
1031 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1036 reg = (reg >> 5) & 0x3;
1043 else if (reg == 0x1)
1049 else if (reg == 0x2)
1065 handle->
debug_print(
"mcp9600: read raw adc data failed.\n");
1070 *raw = (int32_t)(((uint32_t)buf[0] << 16) | ((uint32_t)buf[1]) << 8) | buf[2];
1071 if ((buf[0] & 0x80) != 0)
1073 *raw = (int32_t)((uint32_t)(*raw) | ((uint32_t)(0xFF) << 24));
1075 if (((*raw) & 0x80000000U) != 0)
1077 *raw = ((*raw) >> shift) | (uint32_t)(mask) << (32 - shift);
1081 *raw = ((*raw) >> shift);
1084 *uv = (double)(*raw) * resolution;
1117 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1123 reg |= resolution << 7;
1127 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
1163 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1201 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1207 reg |= resolution << 5;
1211 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
1247 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1285 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1295 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
1331 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1369 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1379 handle->
debug_print(
"mcp9600: write device configuration failed.\n");
1415 handle->
debug_print(
"mcp9600: read device configuration failed.\n");
1453 handle->
debug_print(
"mcp9600: read thermocouple sensor configuration failed.\n");
1463 handle->
debug_print(
"mcp9600: write thermocouple sensor configuration failed.\n");
1499 handle->
debug_print(
"mcp9600: read thermocouple sensor configuration failed.\n");
1536 handle->
debug_print(
"mcp9600: read thermocouple sensor configuration failed.\n");
1542 reg |= coefficient << 0;
1546 handle->
debug_print(
"mcp9600: write thermocouple sensor configuration failed.\n");
1582 handle->
debug_print(
"mcp9600: read thermocouple sensor configuration failed.\n");
1613 *reg = (int16_t)(c * 16.0f);
1640 *c = (float)reg / 16.0f;
1712 handle->
debug_print(
"mcp9600: alert is invalid.\n");
1716 buf[0] = (reg >> 8) & 0xFF;
1717 buf[1] = (reg >> 0) & 0xFF;
1718 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 2);
1721 handle->
debug_print(
"mcp9600: set alert limit failed.\n");
1796 handle->
debug_print(
"mcp9600: alert is invalid.\n");
1800 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 2);
1803 handle->
debug_print(
"mcp9600: get alert limit failed.\n");
1807 *reg = (int16_t)(((uint16_t)(buf[0]) << 8) | buf[1]);
1834 *reg = (uint8_t)(c);
1933 handle->
debug_print(
"mcp9600: alert is invalid.\n");
1938 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
1941 handle->
debug_print(
"mcp9600: set alert hysteresis failed.\n");
2016 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2020 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2023 handle->
debug_print(
"mcp9600: get alert hysteresis failed.\n");
2098 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2102 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2105 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2109 buf[0] &= ~(1 << 7);
2111 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2114 handle->
debug_print(
"mcp9600: set alert config failed.\n");
2189 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2193 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2196 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2200 *status = (buf[0] >> 7) & 0x01;
2273 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2277 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2280 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2284 buf[0] &= ~(1 << 4);
2285 buf[0] |= maintain_detect << 4;
2286 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2289 handle->
debug_print(
"mcp9600: set alert config failed.\n");
2365 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2369 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2372 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2448 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2452 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2455 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2459 buf[0] &= ~(1 << 3);
2460 buf[0] |= edge << 3;
2461 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2464 handle->
debug_print(
"mcp9600: set alert config failed.\n");
2539 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2543 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2546 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2622 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2626 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2629 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2633 buf[0] &= ~(1 << 2);
2634 buf[0] |= level << 2;
2635 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2638 handle->
debug_print(
"mcp9600: set alert config failed.\n");
2713 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2717 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2720 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2796 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2800 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2803 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2807 buf[0] &= ~(1 << 1);
2808 buf[0] |= mode << 1;
2809 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2812 handle->
debug_print(
"mcp9600: set alert config failed.\n");
2887 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2891 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2894 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2970 handle->
debug_print(
"mcp9600: alert is invalid.\n");
2974 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
2977 handle->
debug_print(
"mcp9600: get alert config failed.\n");
2981 buf[0] &= ~(1 << 0);
2982 buf[0] |= enable << 0;
2983 res = a_mcp9600_iic_write(handle, reg_addr, (uint8_t *)buf, 1);
2986 handle->
debug_print(
"mcp9600: set alert config failed.\n");
3061 handle->
debug_print(
"mcp9600: alert is invalid.\n");
3065 res = a_mcp9600_iic_read(handle, reg_addr, (uint8_t *)buf, 1);
3068 handle->
debug_print(
"mcp9600: get alert config failed.\n");
3106 handle->
debug_print(
"mcp9600: read device id failed.\n");
3140 return a_mcp9600_iic_write(handle, reg, buf, len);
3167 return a_mcp9600_iic_read(handle, reg, buf, len);
#define MCP9600_REG_ALERT4_HYSTERESIS
#define MCP9600_REG_DEVICE_ID_REVISON
#define MCP9600_REG_TEMPERATURE_ALERT2_LIMIT
#define MCP9600_REG_TEMPERATURE_ALERT3_LIMIT
#define MCP9600_REG_DEVICE_CONFIGURATION
#define SUPPLY_VOLTAGE_MAX
#define MCP9600_REG_THERMOCOUPLE_HOT_JUNCTION
chip register definition
#define MCP9600_REG_ALERT3_HYSTERESIS
#define MCP9600_REG_COLD_JUNCTION_TEMPERATURE
#define MCP9600_REG_ALERT1_HYSTERESIS
#define MANUFACTURER_NAME
#define SUPPLY_VOLTAGE_MIN
#define MCP9600_REG_ALERT4_CONFIGURATION
#define MCP9600_REG_ALERT3_CONFIGURATION
#define MCP9600_REG_ALERT2_HYSTERESIS
#define MCP9600_REG_ALERT2_CONFIGURATION
#define MCP9600_REG_THERMOCOUPLE_SENSOR_CONFIGURATION
#define MCP9600_REG_JUNCTIONS_TEMPERATURE_DELTA
#define CHIP_NAME
chip information definition
#define MCP9600_REG_ALERT1_CONFIGURATION
#define MCP9600_REG_STATUS
#define MCP9600_REG_TEMPERATURE_ALERT4_LIMIT
#define MCP9600_REG_RAW_ADC_DATA
#define MCP9600_REG_TEMPERATURE_ALERT1_LIMIT
driver mcp9600 header file
mcp9600_active_level_t
mcp9600 active level enumeration definition
uint8_t mcp9600_get_cold_junction_resolution(mcp9600_handle_t *handle, mcp9600_cold_junction_resolution_t *resolution)
get the cold junction resolution
mcp9600_mode_t
mcp9600 mode enumeration definition
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_interrupt(mcp9600_handle_t *handle, mcp9600_alert_t alert, uint8_t *status)
get the interrupt flag
mcp9600_input_range_t
mcp9600 input range enumeration definition
mcp9600_cold_junction_resolution_t
mcp9600 cold junction resolution enumeration definition
mcp9600_address_t
mcp9600 address enumeration definition
struct mcp9600_info_s mcp9600_info_t
mcp9600 information structure definition
mcp9600_thermocouple_type_t
mcp9600 thermocouple type enumeration definition
uint8_t mcp9600_get_alert_hysteresis(mcp9600_handle_t *handle, mcp9600_alert_t alert, uint8_t *reg)
get the alert hysteresis
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_set_detect_edge(mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_detect_edge_t edge)
set the detect edge
uint8_t mcp9600_clear_status_burst_complete_flag(mcp9600_handle_t *handle)
clear the burst complete status flag
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_cold_junction_temperature(mcp9600_handle_t *handle, int16_t *raw, float *s)
get the cold junction temperature
uint8_t mcp9600_set_cold_junction_resolution(mcp9600_handle_t *handle, mcp9600_cold_junction_resolution_t resolution)
set the cold junction resolution
mcp9600_filter_coefficient_t
mcp9600 filter coefficient enumeration definition
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_get_junction_thermocouple_delta(mcp9600_handle_t *handle, int16_t *raw, float *s)
get the junction thermocouple delta
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
mcp9600_adc_resolution_t
mcp9600 adc resolution enumeration definition
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_interrupt(mcp9600_handle_t *handle, mcp9600_alert_t alert)
clear the interrupt flag
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_addr_pin(mcp9600_handle_t *handle, mcp9600_address_t *addr_pin)
get the iic address pin
uint8_t mcp9600_set_thermocouple_type(mcp9600_handle_t *handle, mcp9600_thermocouple_type_t type)
set the thermocouple type
uint8_t mcp9600_stop_continuous_read(mcp9600_handle_t *handle)
stop reading data
uint8_t mcp9600_set_mode(mcp9600_handle_t *handle, mcp9600_mode_t mode)
set the mode
uint8_t mcp9600_start_continuous_read(mcp9600_handle_t *handle)
start reading data
uint8_t mcp9600_get_adc_resolution(mcp9600_handle_t *handle, mcp9600_adc_resolution_t *resolution)
get the adc resolution
struct mcp9600_handle_s mcp9600_handle_t
mcp9600 handle structure definition
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_get_raw_adc(mcp9600_handle_t *handle, int32_t *raw, double *uv)
get the raw adc
mcp9600_burst_mode_sample_t
mcp9600 burst mode sample enumeration definition
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_get_detect_edge(mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_detect_edge_t *edge)
get the detect edge
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_get_mode(mcp9600_handle_t *handle, mcp9600_mode_t *mode)
get the mode
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_get_thermocouple_type(mcp9600_handle_t *handle, mcp9600_thermocouple_type_t *type)
get the thermocouple type
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
mcp9600_alert_status_t
mcp9600 alert status enumeration definition
uint8_t mcp9600_get_status_burst_complete_flag(mcp9600_handle_t *handle, mcp9600_bool_t *status)
get the burst complete status flag
mcp9600_interrupt_mode_t
mcp9600 interrupt mode enumeration definition
uint8_t mcp9600_get_alert_limit(mcp9600_handle_t *handle, mcp9600_alert_t alert, int16_t *reg)
get the alert limit
mcp9600_alert_t
mcp9600 alert enumeration definition
mcp9600_bool_t
mcp9600 bool enumeration definition
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_alert_output(mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_bool_t enable)
set the alert output
uint8_t mcp9600_set_addr_pin(mcp9600_handle_t *handle, mcp9600_address_t addr_pin)
set the iic address pin
uint8_t mcp9600_set_filter_coefficient(mcp9600_handle_t *handle, mcp9600_filter_coefficient_t coefficient)
set the filter coefficient
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_set_burst_mode_sample(mcp9600_handle_t *handle, mcp9600_burst_mode_sample_t sample)
set the burst mode sample
uint8_t mcp9600_get_filter_coefficient(mcp9600_handle_t *handle, mcp9600_filter_coefficient_t *coefficient)
get the filter coefficient
mcp9600_temperature_maintain_detect_t
mcp9600 temperature maintain detect enumeration definition
uint8_t mcp9600_get_status_input_range(mcp9600_handle_t *handle, mcp9600_input_range_t *range)
get the input range status
uint8_t mcp9600_info(mcp9600_info_t *info)
get chip information
uint8_t mcp9600_get_device_id_revision(mcp9600_handle_t *handle, uint8_t *id, uint8_t *revision)
get the device id and revision
uint8_t mcp9600_get_hot_junction_temperature(mcp9600_handle_t *handle, int16_t *raw, float *s)
get the hot junction temperature
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_clear_status_temperature_update_flag(mcp9600_handle_t *handle)
clear the temperature update status flag
uint8_t mcp9600_deinit(mcp9600_handle_t *handle)
close the chip
uint8_t mcp9600_set_adc_resolution(mcp9600_handle_t *handle, mcp9600_adc_resolution_t resolution)
set the adc resolution
mcp9600_detect_edge_t
mcp9600 detect edge enumeration definition
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_get_alert_status(mcp9600_handle_t *handle, mcp9600_alert_t alert, mcp9600_alert_status_t *status)
get the alert status
uint8_t mcp9600_init(mcp9600_handle_t *handle)
initialize the chip
uint8_t mcp9600_get_reg(mcp9600_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
uint8_t mcp9600_set_reg(mcp9600_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint8_t(* iic_read_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
uint8_t(* iic_write_cmd)(uint8_t addr, uint8_t *buf, uint16_t len)
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v