1 /*******************************************************************************
2 * @file  rsi_time_period.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 
34 #ifndef __RSI_TIME_PERIOD_H__
35 #define __RSI_TIME_PERIOD_H__
36 #include "rsi_ccp_common.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 rsi_error_t RSI_TIMEPERIOD_TimerClkSel(TIME_PERIOD_Type *pstcTimePeriod, uint32_t u32TimePeriod);
43 rsi_error_t RSI_TIMEPERIOD_RCCalibration(TIME_PERIOD_Type *pstcTimePeriod,
44                                          uint32_t u32TimePeriodRefClk,
45                                          uint32_t u32XtalSettle,
46                                          uint16_t u16RcClkCnt,
47                                          boolean_t bPeriodicCalibEn,
48                                          uint8_t u8PeriodicCalibRate,
49                                          boolean_t bTemperatureCalibEn,
50                                          uint8_t u8TemperatureVal,
51                                          uint8_t u8AverageFactor);
52 uint32_t RSI_TIMEPERIOD_RCCalibTimePeriodRead(const TIME_PERIOD_Type *pstcTimePeriod);
53 uint32_t RSI_TIMEPERIOD_ROCalibTimePeriodRead(const TIME_PERIOD_Type *pstcTimePeriod);
54 rsi_error_t RSI_TIMEPERIOD_XTAL32KHzCalibration(TIME_PERIOD_Type *pstcTimePeriod,
55                                                 uint32_t u32TimePeriodRefClk,
56                                                 uint32_t u32XtalSettle,
57                                                 uint16_t u16RcClkCnt,
58                                                 boolean_t bPeriodicCalibEn,
59                                                 uint8_t u8PeriodicCalibRate,
60                                                 boolean_t bTemperatureCalibEn,
61                                                 uint8_t u8TemperatureVal,
62                                                 uint8_t u8AverageFactor);
63 rsi_error_t RSI_TIMEPERIOD_ROCalibration(TIME_PERIOD_Type *pstcTimePeriod,
64                                          uint8_t u8RefClkSrc,
65                                          uint32_t u32XtalSettle,
66                                          uint16_t u16RoClkCnt,
67                                          boolean_t bPeriodicCalibEn,
68                                          uint8_t u8PeriodicCalibRate,
69                                          uint8_t u8AverageFactor
70 
71 );
72 rsi_error_t RSI_TIMEPERIOD_LowPwrTrigSelEn(TIME_PERIOD_Type *pstcTimePeriod, boolean_t bEn);
73 rsi_error_t RSI_TIMEPERIOD_VbatTrigSel(TIME_PERIOD_Type *pstcTimePeriod, uint8_t u8Time);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 /*End of file not truncated*/
80 #endif /*__RSI_TIME_PERIOD_H__*/
81