Zephyr API Documentation
4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ifx_clock_source_psoc4xx.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2025 Infineon Technologies AG,
3
* or an affiliate of Infineon Technologies AG.
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef IFX_CLOCK_SOURCE_PSOC4XX_H_
9
#define IFX_CLOCK_SOURCE_PSOC4XX_H_
10
11
/*
12
* Note : use IFX_PATH_PSOC4_IMO for internal main oscillator as src
13
* use IFX_PATH_PSOC4_EXT for External clock as src
14
*
15
* Usage : input src for clk_hf
16
*/
17
#define IFX_PATH_PSOC4_IMO 0
18
#define IFX_PATH_PSOC4_EXT 1
19
20
/*
21
* Note : use IFX_PATH_PSOC4_PUMP_GND for No clock, connect to gnd
22
* use IFX_PATH_PSOC4_PUMP_IMO for main IMO pump output
23
* use IFX_PATH_PSOC4_PUMP_HFCLK for clk_hf pump
24
*
25
* Usage : input src for clk_pump
26
*/
27
#define IFX_PATH_PSOC4_PUMP_GND 0
28
#define IFX_PATH_PSOC4_PUMP_IMO 1
29
#define IFX_PATH_PSOC4_PUMP_HFCLK 2
30
31
/*
32
* @brief Device Tree compatible clock source to Infineon PDL clock source
33
*
34
* This macro converts Device Tree clock source identifiers (defined in
35
* ifx_clock_source_common.h) to the corresponding Infineon PDL API values.
36
*
37
* Usage : in clock_control_infineon_fixed_factor_clock.c, use this macro
38
* when passing clock source values from Device Tree to Infineon PDL APIs.
39
* This allows users to use the generic ifx_clock_source_common.h macros
40
* directly in Device Tree files while ensuring compatibility with the
41
* underlying PDL implementation.
42
*/
43
#define IFX_PSOC4_HFCLK_DIV(div) \
44
((div) == 0 ? CY_SYSCLK_NO_DIV \
45
: (div) == 1 ? CY_SYSCLK_DIV_2 \
46
: (div) == 3 ? CY_SYSCLK_DIV_4 \
47
: (div) == 7 ? CY_SYSCLK_DIV_8 \
48
: CY_SYSCLK_NO_DIV)
49
50
#endif
zephyr
dt-bindings
clock
ifx_clock_source_psoc4xx.h
Generated on
for Zephyr API Documentation by
1.15.0