C code and C++ library, driver software for Maxim Integrated DS1775, DS75 thermometer and thermostat temperature sensor. Code supports continuous or shut-down/standby, hysteresis, alarm limits, comparator or interrupt mode, fault filtering, and active low/high. Compact 5-pin SOT23 packaging

Dependents:   DS1775_Digital_Thermostat_Temperature

Committer:
phonemacro
Date:
Wed Apr 10 18:07:50 2019 +0000
Revision:
20:cf75ff9e5560
Parent:
18:69436cb7b19e
remove extra waits in conversion

Who changed what in which revision?

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