C code and C++ library, driver software for the low-power small WLP package MAX31875 temperature sensor. Code supports one-shot, shut-down/standby, hysteresis, alarm limits.

Dependents:   MAX31875_Temperature_Sensor_Small_WLP Click-Sensor-MAX31875 NuMaker-mbed-Sensor-MAX31875

Committer:
phonemacro
Date:
Wed Feb 13 22:17:06 2019 +0000
Revision:
6:61f3693edd6c
Parent:
3:3528e660168c
correct initialization in write_trip_low, high.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phonemacro 3:3528e660168c 1 /*******************************************************************************
phonemacro 3:3528e660168c 2 * Copyright (C) 2019 Maxim Integrated Products, Inc., All Rights Reserved.
phonemacro 3:3528e660168c 3 *
phonemacro 3:3528e660168c 4 * Permission is hereby granted, free of charge, to any person obtaining a
phonemacro 3:3528e660168c 5 * copy of this software and associated documentation files (the "Software"),
phonemacro 3:3528e660168c 6 * to deal in the Software without restriction, including without limitation
phonemacro 3:3528e660168c 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
phonemacro 3:3528e660168c 8 * and/or sell copies of the Software, and to permit persons to whom the
phonemacro 3:3528e660168c 9 * Software is furnished to do so, subject to the following conditions:
phonemacro 3:3528e660168c 10 *
phonemacro 3:3528e660168c 11 * The above copyright notice and this permission notice shall be included
phonemacro 3:3528e660168c 12 * in all copies or substantial portions of the Software.
phonemacro 3:3528e660168c 13 *
phonemacro 3:3528e660168c 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
phonemacro 3:3528e660168c 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
phonemacro 3:3528e660168c 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
phonemacro 3:3528e660168c 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
phonemacro 3:3528e660168c 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
phonemacro 3:3528e660168c 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
phonemacro 3:3528e660168c 20 * OTHER DEALINGS IN THE SOFTWARE.
phonemacro 3:3528e660168c 21 *
phonemacro 3:3528e660168c 22 * Except as contained in this notice, the name of Maxim Integrated
phonemacro 3:3528e660168c 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
phonemacro 3:3528e660168c 24 * Products, Inc. Branding Policy.
phonemacro 3:3528e660168c 25 *
phonemacro 3:3528e660168c 26 * The mere transfer of this software does not imply any licenses
phonemacro 3:3528e660168c 27 * of trade secrets, proprietary technology, copyrights, patents,
phonemacro 3:3528e660168c 28 * trademarks, maskwork rights, or any other form of intellectual
phonemacro 3:3528e660168c 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
phonemacro 3:3528e660168c 30 * ownership rights.
phonemacro 3:3528e660168c 31 *******************************************************************************
phonemacro 3:3528e660168c 32 * @file max31875_c.h
phonemacro 3:3528e660168c 33 *******************************************************************************
phonemacro 3:3528e660168c 34 */
phonemacro 3:3528e660168c 35 #ifndef MAX31875_C_H
phonemacro 3:3528e660168c 36 #define MAX31875_C_H
phonemacro 3:3528e660168c 37 #include "mbed.h"
phonemacro 3:3528e660168c 38 /*****************************************************************************/
phonemacro 3:3528e660168c 39 /* C header for MAX31875 driver */
phonemacro 3:3528e660168c 40 /*****************************************************************************/
phonemacro 3:3528e660168c 41
phonemacro 3:3528e660168c 42 int max31875_init(uint8_t slaveAddress);
phonemacro 3:3528e660168c 43
phonemacro 3:3528e660168c 44 int max31875_read_reg(uint16_t *value, char reg, I2C &i2c_bus);
phonemacro 3:3528e660168c 45
phonemacro 3:3528e660168c 46 float max31875_read_reg_as_temperature(uint8_t reg, I2C &i2c_bus);
phonemacro 3:3528e660168c 47
phonemacro 3:3528e660168c 48 int max31875_write_reg(uint16_t value, char reg, I2C &i2c_bus);
phonemacro 3:3528e660168c 49
phonemacro 3:3528e660168c 50 int max31875_write_cfg(uint16_t cfg, I2C &i2c_bus);
phonemacro 3:3528e660168c 51
phonemacro 3:3528e660168c 52 int max31875_write_trip_low(float temperature, I2C &i2c_bus);
phonemacro 3:3528e660168c 53
phonemacro 3:3528e660168c 54 int max31875_write_trip_high(float temperature, I2C &i2c_bus);
phonemacro 3:3528e660168c 55
phonemacro 3:3528e660168c 56 float max31875_celsius_to_fahrenheit(float temp_c);
phonemacro 3:3528e660168c 57
phonemacro 3:3528e660168c 58 #endif/* MAX31875_C_H */