Mahesh Phalke / tempsensors_prv
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ptc_ky81_110.h Source File

ptc_ky81_110.h

Go to the documentation of this file.
00001 /*!
00002  *****************************************************************************
00003   @file:  ptc_ky81_110.h
00004 
00005   @brief: This file contains the global parameters for ptc_ky81_110 module
00006 
00007   @details:
00008  -----------------------------------------------------------------------------
00009  Copyright (c) 2021 Analog Devices, Inc.  All rights reserved.
00010 
00011  This software is proprietary to Analog Devices, Inc. and its licensors.
00012  By using this software you agree to the terms of the associated
00013  Analog Devices Software License Agreement.
00014 
00015 *****************************************************************************/
00016 
00017 #include <stdint.h>
00018 
00019 #ifndef _PTC_KY81_110_H_
00020 #define _PTC_KY81_110_H_
00021 
00022 /******************************************************************************/
00023 /***************************** Include Files **********************************/
00024 /******************************************************************************/
00025 
00026 #include "thermistor.h"
00027 
00028 /* This is a child class of thermistor parent class and contains
00029  * attributes specific to KY81/110 PTC sensor */
00030 class ptc_ky81_110 : thermistor
00031 {
00032 private:
00033     /* KY81/110 PTC temperature coefficient */
00034     float temperature_coeff;
00035 #ifdef DEFINE_LOOKUP_TABLES
00036     int16_t lut_offset;
00037     int16_t lut_size;
00038     static const uint32_t lut[];
00039 #endif
00040 
00041 public:
00042     ptc_ky81_110();
00043     float convert(const float resistance);
00044 #ifdef DEFINE_LOOKUP_TABLES
00045     float lookup(const float resistance);
00046 #endif
00047 };
00048 
00049 #endif  /* _PTC_KY81_110_H_ */