RDK Documentation (Open Sourced RDK Components)
mfr_temperature.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 /**
21  * @defgroup iarmmgrs
22  * @{
23  * @defgroup mfr
24  * @{
25  **/
26 
27 
28 #ifndef __MFR_TEMPERATURE_API_H__
29 #define __MFR_TEMPERATURE_API_H__
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 #include "mfrTypes.h"
35 
36 typedef enum _mfrTemperatureState_t {
37  mfrTEMPERATURE_NORMAL = 0, /* Temp is within normal operating range */
38  mfrTEMPERATURE_HIGH, /* Temp is high, but just a warning as device can still operate */
39  mfrTEMPERATURE_CRITICAL /* Temp is critical, should trigger a thermal reset */
40 } mfrTemperatureState_t;
41 
42 
43 /**
44 * @brief get current temperature of the core
45 *
46 * @param [out] state: the current state of the core temperature
47 * @param [out] temperatureValue: raw temperature value of the core
48 * in degrees Celsius
49 *
50 * @return Error Code
51 */
52 mfrError_t mfrGetTemperature(mfrTemperatureState_t *state, int *temperatureValue, int *wifiTemp);
53 
54 
55 /**
56 * @brief Set temperature thresholds which will determine the state returned
57 ​​* from a call to mfrGetTemperature
58 *
59 * @param [in] tempHigh: Temperature threshold at which mfrTEMPERATURE_HIGH
60 * state will be reported.
61 * @param [in] tempCritical: Temperature threshold at which mfrTEMPERATURE_CRITICAL
62 * state will be reported.
63 *
64 * @return Error Code
65 */
66 mfrError_t mfrSetTempThresholds(int tempHigh, int tempCritical);
67 
68 
69 /**
70 * @brief Get the temperature thresholds which determine the state returned
71 ​​* from a call to mfrGetTemperature
72 *
73 * @param [out] tempHigh: Temperature threshold at which mfrTEMPERATURE_HIGH
74 * state will be reported.
75 * @param [out] tempCritical: Temperature threshold at which mfrTEMPERATURE_CRITICAL
76 * state will be reported.
77 *
78 * @return Error Code
79 */
80 mfrError_t mfrGetTempThresholds(int *tempHigh, int *tempCritical);
81 
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif /*__MFR_TEMPERATURE_API_H__*/
88 
89 /** @} */
90 /** @} */
mfrGetTempThresholds
mfrError_t mfrGetTempThresholds(int *tempHigh, int *tempCritical)
Get the temperature thresholds which determine the state returned ​​* from a call to mfrGetTemperatur...
mfrGetTemperature
mfrError_t mfrGetTemperature(mfrTemperatureState_t *state, int *temperatureValue, int *wifiTemp)
get current temperature of the core
mfrSetTempThresholds
mfrError_t mfrSetTempThresholds(int tempHigh, int tempCritical)
Set temperature thresholds which will determine the state returned ​​* from a call to mfrGetTemperatu...