1 /*******************************************************************************
2 * @file  rsi_temp_sensor.h
3  *******************************************************************************
4  * # License
5  * <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b>
6  *******************************************************************************
7  *
8  * SPDX-License-Identifier: Zlib
9  *
10  * The licensor of this software is Silicon Laboratories Inc.
11  *
12  * This software is provided 'as-is', without any express or implied
13  * warranty. In no event will the authors be held liable for any damages
14  * arising from the use of this software.
15  *
16  * Permission is granted to anyone to use this software for any purpose,
17  * including commercial applications, and to alter it and redistribute it
18  * freely, subject to the following restrictions:
19  *
20  * 1. The origin of this software must not be misrepresented; you must not
21  *    claim that you wrote the original software. If you use this software
22  *    in a product, an acknowledgment in the product documentation would be
23  *    appreciated but is not required.
24  * 2. Altered source versions must be plainly marked as such, and must not be
25  *    misrepresented as being the original software.
26  * 3. This notice may not be removed or altered from any source distribution.
27  *
28  ******************************************************************************/
29 
30 /**
31  * Includes
32  */
33 #ifndef __RSI_TEMP_SENSOR_H__
34 #define __RSI_TEMP_SENSOR_H__
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /**
41  * \ingroup   RSI_SPECIFIC_DRIVERS
42  * \defgroup RSI_TEMP_SENSORS RSI:RS1xxxx TS
43  *  @brief
44  *  @{
45  *
46  */
47 #include "rsi_ccp_common.h"
48 
49 void RSI_TS_SetCntFreez(MCU_TEMP_Type *pstcTempSens, uint32_t u32CountFreez);
50 void RSI_TS_RefClkSel(MCU_TEMP_Type *pstcTempSens, boolean_t bRefClk);
51 void RSI_TS_Enable(MCU_TEMP_Type *pstcTempSens, boolean_t bEn);
52 
53 /**
54  * @}
55  */
56 void RSI_TS_Config(MCU_TEMP_Type *pstcTempSens, uint32_t u32Nomial);
57 /**
58  * \ingroup   RSI_SPECIFIC_DRIVERS
59  * \defgroup RSI_TEMP_SENSORS RSI:RS1xxxx TEMPERARTURE SENSOR
60  *  @brief
61  *  @{
62  *
63  */
64 uint32_t RSI_TS_ReadTemp(const MCU_TEMP_Type *pstcTempSens);
65 uint32_t RSI_TS_GetRefClkCnt(const MCU_TEMP_Type *pstcTempSens);
66 uint32_t RSI_TS_GetPtatClkCnt(const MCU_TEMP_Type *pstcTempSens);
67 void RSI_TS_LoadBjt(MCU_TEMP_Type *pstcTempSens, uint8_t temp);
68 void RSI_TS_RoBjtEnable(MCU_TEMP_Type *pstcTempSens, boolean_t enable);
69 void RSI_Periodic_TempUpdate(TIME_PERIOD_Type *temp, uint8_t enable, uint8_t trigger_time);
70 
71 /**
72  * @}
73  */
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 /*End of file not truncated */
79 #endif /**__RSI_TEMP_SENSOR_H__*/
80 
81 /* @}end of group RSI_TEMP_SENSORS */
82