Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: platform_drivers AD7124_no_OS adi_console_menu tempsensors_prv
app/ad7124_temperature_sensor.h@0:08ba94bc5a30, 2021-02-19 (annotated)
- Committer:
- mahphalke
- Date:
- Fri Feb 19 16:26:06 2021 +0530
- Revision:
- 0:08ba94bc5a30
- Child:
- 5:90166c496b01
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mahphalke |
0:08ba94bc5a30 | 1 | /***************************************************************************//* |
mahphalke |
0:08ba94bc5a30 | 2 | * @file ad7124_temperature_sensor.h |
mahphalke |
0:08ba94bc5a30 | 3 | * @brief AD7124 temperature sensor module global defines |
mahphalke |
0:08ba94bc5a30 | 4 | * @details |
mahphalke |
0:08ba94bc5a30 | 5 | ****************************************************************************** |
mahphalke |
0:08ba94bc5a30 | 6 | * Copyright (c) 2021 Analog Devices, Inc. All Rights Reserved. |
mahphalke |
0:08ba94bc5a30 | 7 | * |
mahphalke |
0:08ba94bc5a30 | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
mahphalke |
0:08ba94bc5a30 | 9 | * By using this software you agree to the terms of the associated |
mahphalke |
0:08ba94bc5a30 | 10 | * Analog Devices Software License Agreement. |
mahphalke |
0:08ba94bc5a30 | 11 | ******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 12 | |
mahphalke |
0:08ba94bc5a30 | 13 | #ifndef AD7124_TEMPERATURE_SENSOR_H_ |
mahphalke |
0:08ba94bc5a30 | 14 | #define AD7124_TEMPERATURE_SENSOR_H_ |
mahphalke |
0:08ba94bc5a30 | 15 | |
mahphalke |
0:08ba94bc5a30 | 16 | #ifdef __cplusplus |
mahphalke |
0:08ba94bc5a30 | 17 | extern "C" |
mahphalke |
0:08ba94bc5a30 | 18 | { |
mahphalke |
0:08ba94bc5a30 | 19 | #endif // _cplusplus |
mahphalke |
0:08ba94bc5a30 | 20 | |
mahphalke |
0:08ba94bc5a30 | 21 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 22 | /***************************** Include Files **********************************/ |
mahphalke |
0:08ba94bc5a30 | 23 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 24 | |
mahphalke |
0:08ba94bc5a30 | 25 | #include <stdint.h> |
mahphalke |
0:08ba94bc5a30 | 26 | #include "ad7124_regs_configs.h" |
mahphalke |
0:08ba94bc5a30 | 27 | |
mahphalke |
0:08ba94bc5a30 | 28 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 29 | /********************* Macros and Constants Definitions ***********************/ |
mahphalke |
0:08ba94bc5a30 | 30 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 31 | |
mahphalke |
0:08ba94bc5a30 | 32 | /* RTD Rref Resistance value (in ohms) */ |
mahphalke |
0:08ba94bc5a30 | 33 | #define RTD_RREF 5110 |
mahphalke |
0:08ba94bc5a30 | 34 | |
mahphalke |
0:08ba94bc5a30 | 35 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 36 | /********************** Public/Extern Declarations ****************************/ |
mahphalke |
0:08ba94bc5a30 | 37 | /******************************************************************************/ |
mahphalke |
0:08ba94bc5a30 | 38 | |
mahphalke |
0:08ba94bc5a30 | 39 | float get_tc_temperature(float tc_sample, float cjc_sample, |
mahphalke |
0:08ba94bc5a30 | 40 | cjc_sensor_type cjc_sensor); |
mahphalke |
0:08ba94bc5a30 | 41 | float get_rtd_temperature(int32_t rtd_sample); |
mahphalke |
0:08ba94bc5a30 | 42 | void store_rtd_calibrated_iout_ratio(float iout_ratio, bool status); |
mahphalke |
0:08ba94bc5a30 | 43 | float get_ntc_thermistor_temperature(int32_t ntc_sample); |
mahphalke |
0:08ba94bc5a30 | 44 | float get_ptc_thermistor_temperature(int32_t ntc_sample); |
mahphalke |
0:08ba94bc5a30 | 45 | |
mahphalke |
0:08ba94bc5a30 | 46 | #ifdef __cplusplus // Closing extern c |
mahphalke |
0:08ba94bc5a30 | 47 | } |
mahphalke |
0:08ba94bc5a30 | 48 | #endif // _cplusplus |
mahphalke |
0:08ba94bc5a30 | 49 | |
mahphalke |
0:08ba94bc5a30 | 50 | #endif // end of AD7124_TEMPERATURE_SENSOR_H_ |