1 /***************************************************************************/ /**
2  * @file
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 // Includes Files
31 
32 #include "base_types.h"
33 
34 #ifndef RSI_CLOCK_UPDATE_H
35 #define RSI_CLOCK_UPDATE_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 typedef enum PERI_CLKS {
42   M4_USART0,  // Enables or Disables USART1 Peripheral clock when it is passed
43   M4_UART1,   // Enables or Disables USART2 Master Peripheral clock when it is passed
44   M4_SSI_MST, // Enables or Disables SSI Master Peripheral clock when it is passed
45   M4_CT,      // Enables or Disables CT Peripheral clock when it is passed
46 #ifndef SLI_SI917
47   M4_SD_MEM, // Enables or Disables SD_MEM Peripheral clock when it is passed
48   M4_CCI,    // Enables or Disables CCI Peripheral clock when it is passed
49 #endif
50   M4_QSPI, // Enables or Disables QSPI Peripheral clock when it is passed
51   M4_QSPI2,
52   M4_GSPI,     // Enables or Disables GSPI Peripheral clock when it is passed
53   M4_ETHERNET, // Enables or Disables ETHERNET Peripheral clock when it is passed
54   M4_I2SM,     // Enables or Disables I2SM Peripheral clock when it is passed
55   ULPSS_SSI,
56   ULPSS_I2S,
57   ULPSS_UART,
58   ULPSS_TIMER,
59   ULPSS_AUX,
60   //ULPSS_VAD,
61   ULPSS_TOUCH,
62 } PERI_CLKS_T;
63 
64 uint32_t RSI_CLK_GetBaseClock(PERI_CLKS_T peri_src);
65 uint32_t GetTickCount(void);
66 void SysTick_Handler(void);
67 
68 #ifdef __SYSTICK
69 void rsi_delay_ms(uint32_t val);
70 #endif
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif // RSI_CLOCK_UPDATE_H
77