Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
4.2.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Zephyr API Documentation
Introduction
Deprecated List
Topics
Data Structures
Files
File List
doc
kernel
lib
modules
subsys
zephyr
acpi
app_memory
arch
audio
bluetooth
canbus
console
crypto
data
debug
devicetree
dfu
display
drivers
dsp
dt-bindings
acpi
adc
battery
clock
silabs
adi_max32_clock.h
ast10x0_clock.h
atmel_sam_pmc.h
bflb_bl60x_clock.h
bflb_clock_common.h
ch32v00x-clocks.h
ch32v20x_30x-clocks.h
esp32_clock.h
esp32c2_clock.h
esp32c3_clock.h
esp32c6_clock.h
esp32s2_clock.h
esp32s3_clock.h
gd32-clocks-common.h
gd32a50x-clocks.h
gd32e10x-clocks.h
gd32e50x-clocks.h
gd32f3x0-clocks.h
gd32f403-clocks.h
gd32f4xx-clocks.h
gd32l23x-clocks.h
gd32vf103-clocks.h
imx8ulp_clock.h
imx943_clock.h
imx95_clock.h
imx_ccm.h
imx_ccm_rev2.h
intel_socfpga_clock.h
ite-it51xxx-clock.h
kinetis_mcg.h
kinetis_pcc.h
kinetis_scg.h
kinetis_sim.h
lpc11u6x_clock.h
mchp_xec_pcr.h
mcux_lpc_syscon_clock.h
microchip_sam_pmc.h
mspm0_clock.h
npcm_clock.h
npcx_clock.h
nrf-auxpll.h
nrfs-audiopll.h
numaker_m2l31x_clock.h
numaker_m46x_clock.h
numaker_m55m1x_clock.h
nxp_s32k146_clock.h
nxp_s32k148_clock.h
nxp_s32k344_clock.h
nxp_s32z2_clock.h
r8a7795_cpg_mssr.h
r8a779f0_cpg_mssr.h
ra_clock.h
renesas_cpg_mssr.h
renesas_rza2m_clock.h
renesas_rzg_clock.h
rpi_pico_clock_common.h
rpi_pico_rp2040_clock.h
rpi_pico_rp2350_clock.h
rts5912_clock.h
rx_clock.h
scg_k4.h
stm32_clock.h
stm32_common_clocks.h
stm32c0_clock.h
stm32f0_clock.h
stm32f10x_clock.h
stm32f1_clock.h
stm32f3_clock.h
stm32f410_clock.h
stm32f427_clock.h
stm32f4_clock.h
stm32f7_clock.h
stm32g0_b1x_c1x_clock.h
stm32g0_clock.h
stm32g4_clock.h
stm32h5_clock.h
stm32h7_clock.h
stm32h7rs_clock.h
stm32l0_clock.h
stm32l1_clock.h
stm32l4_clock.h
stm32mp13_clock.h
stm32mp2_clock.h
stm32n6_clock.h
stm32u0_clock.h
stm32u3_clock.h
stm32u5_clock.h
stm32wb0_clock.h
stm32wb_clock.h
stm32wba_clock.h
stm32wl_clock.h
comparator
dac
dai
display
dma
espi
ethernet
flash_controller
gnss
gpio
i2c
input
inputmux
interrupt-controller
ipc_service
led
lora
lvgl
memory-attr
memory-controller
mfd
mipi_dbi
mipi_dsi
misc
pcie
pinctrl
power
pwm
qspi
rdc
regulator
reserved-memory
reset
sensor
sent
spi
timer
usb
usb-c
video
dt-util.h
fs
input
internal
ipc
kernel
linker
llext
logging
lorawan
math
mem_mgmt
mgmt
misc
modbus
modem
multi_heap
net
platform
pm
pmci
portability
posix
psa
random
retention
rtio
sd
sensing
settings
shell
sip_svc
stats
storage
sys
task_wdt
timing
toolchain
tracing
usb
usb_c
xen
zbus
zvfs
bindesc.h
cache.h
device.h
devicetree.h
fatal.h
fatal_types.h
init.h
irq.h
irq_multilevel.h
irq_nextlevel.h
irq_offload.h
kernel.h
kernel_includes.h
kernel_structs.h
kernel_version.h
net_buf.h
shared_irq.h
smf.h
spinlock.h
sw_isr_table.h
sys_clock.h
syscall.h
toolchain.h
types.h
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
ch32v20x_30x-clocks.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 MASSDRIVER EI (massdriver.space)
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef __CH32V20X_V30X_CLOCKS_H__
8
#define __CH32V20X_V30X_CLOCKS_H__
9
10
#define CH32V20X_V30X_AHB_PCENR_OFFSET 0
11
#define CH32V20X_V30X_APB2_PCENR_OFFSET 1
12
#define CH32V20X_V30X_APB1_PCENR_OFFSET 2
13
14
#define CH32V20X_V30X_CLOCK_CONFIG(bus, bit) (((CH32V20X_V30X_##bus##_PCENR_OFFSET) << 5) | (bit))
15
16
#define CH32V20X_V30X_CLOCK_DMA1 CH32V20X_V30X_CLOCK_CONFIG(AHB, 0)
17
#define CH32V20X_V30X_CLOCK_DMA2 CH32V20X_V30X_CLOCK_CONFIG(AHB, 1)
18
#define CH32V20X_V30X_CLOCK_SRAM CH32V20X_V30X_CLOCK_CONFIG(AHB, 2)
19
#define CH32V20X_V30X_CLOCK_FLITF CH32V20X_V30X_CLOCK_CONFIG(AHB, 4)
20
#define CH32V20X_V30X_CLOCK_CRC CH32V20X_V30X_CLOCK_CONFIG(AHB, 6)
21
#define CH32V20X_V30X_CLOCK_FSMC CH32V20X_V30X_CLOCK_CONFIG(AHB, 8)
22
#define CH32V20X_V30X_CLOCK_RNG CH32V20X_V30X_CLOCK_CONFIG(AHB, 9)
23
#define CH32V20X_V30X_CLOCK_SDIO CH32V20X_V30X_CLOCK_CONFIG(AHB, 10)
24
#define CH32V20X_V30X_CLOCK_USBHS CH32V20X_V30X_CLOCK_CONFIG(AHB, 11)
25
#define CH32V20X_V30X_CLOCK_OTG_FS CH32V20X_V30X_CLOCK_CONFIG(AHB, 12)
26
#define CH32V20X_V30X_CLOCK_DVP CH32V20X_V30X_CLOCK_CONFIG(AHB, 13)
27
#define CH32V20X_V30X_CLOCK_ETHMAC CH32V20X_V30X_CLOCK_CONFIG(AHB, 14)
28
#define CH32V20X_V30X_CLOCK_ETHMACTX CH32V20X_V30X_CLOCK_CONFIG(AHB, 15)
29
#define CH32V20X_V30X_CLOCK_ETHMACRX CH32V20X_V30X_CLOCK_CONFIG(AHB, 16)
30
#define CH32V20X_V30X_CLOCK_BLEC CH32V20X_V30X_CLOCK_CONFIG(AHB, 16)
31
#define CH32V20X_V30X_CLOCK_BLES CH32V20X_V30X_CLOCK_CONFIG(AHB, 17)
32
33
#define CH32V20X_V30X_CLOCK_AFIO CH32V20X_V30X_CLOCK_CONFIG(APB2, 0)
34
#define CH32V20X_V30X_CLOCK_IOPA CH32V20X_V30X_CLOCK_CONFIG(APB2, 2)
35
#define CH32V20X_V30X_CLOCK_IOPB CH32V20X_V30X_CLOCK_CONFIG(APB2, 3)
36
#define CH32V20X_V30X_CLOCK_IOPC CH32V20X_V30X_CLOCK_CONFIG(APB2, 4)
37
#define CH32V20X_V30X_CLOCK_IOPD CH32V20X_V30X_CLOCK_CONFIG(APB2, 5)
38
#define CH32V20X_V30X_CLOCK_IOPE CH32V20X_V30X_CLOCK_CONFIG(APB2, 6)
39
#define CH32V20X_V30X_CLOCK_ADC1 CH32V20X_V30X_CLOCK_CONFIG(APB2, 9)
40
#define CH32V20X_V30X_CLOCK_ADC2 CH32V20X_V30X_CLOCK_CONFIG(APB2, 10)
41
#define CH32V20X_V30X_CLOCK_TIM1 CH32V20X_V30X_CLOCK_CONFIG(APB2, 11)
42
#define CH32V20X_V30X_CLOCK_SPI1 CH32V20X_V30X_CLOCK_CONFIG(APB2, 12)
43
#define CH32V20X_V30X_CLOCK_TIM8 CH32V20X_V30X_CLOCK_CONFIG(APB2, 13)
44
#define CH32V20X_V30X_CLOCK_USART1 CH32V20X_V30X_CLOCK_CONFIG(APB2, 14)
45
#define CH32V20X_V30X_CLOCK_TIM9 CH32V20X_V30X_CLOCK_CONFIG(APB2, 19)
46
#define CH32V20X_V30X_CLOCK_TIM10 CH32V20X_V30X_CLOCK_CONFIG(APB2, 20)
47
48
#define CH32V20X_V30X_CLOCK_TIM2 CH32V20X_V30X_CLOCK_CONFIG(APB1, 0)
49
#define CH32V20X_V30X_CLOCK_TIM3 CH32V20X_V30X_CLOCK_CONFIG(APB1, 1)
50
#define CH32V20X_V30X_CLOCK_TIM4 CH32V20X_V30X_CLOCK_CONFIG(APB1, 2)
51
#define CH32V20X_V30X_CLOCK_TIM5 CH32V20X_V30X_CLOCK_CONFIG(APB1, 3)
52
#define CH32V20X_V30X_CLOCK_TIM6 CH32V20X_V30X_CLOCK_CONFIG(APB1, 4)
53
#define CH32V20X_V30X_CLOCK_TIM7 CH32V20X_V30X_CLOCK_CONFIG(APB1, 5)
54
#define CH32V20X_V30X_CLOCK_USART6 CH32V20X_V30X_CLOCK_CONFIG(APB1, 6)
55
#define CH32V20X_V30X_CLOCK_USART7 CH32V20X_V30X_CLOCK_CONFIG(APB1, 7)
56
#define CH32V20X_V30X_CLOCK_USART8 CH32V20X_V30X_CLOCK_CONFIG(APB1, 8)
57
#define CH32V20X_V30X_CLOCK_WWDG CH32V20X_V30X_CLOCK_CONFIG(APB1, 11)
58
#define CH32V20X_V30X_CLOCK_SPI2 CH32V20X_V30X_CLOCK_CONFIG(APB1, 14)
59
#define CH32V20X_V30X_CLOCK_SPI3 CH32V20X_V30X_CLOCK_CONFIG(APB1, 15)
60
#define CH32V20X_V30X_CLOCK_USART2 CH32V20X_V30X_CLOCK_CONFIG(APB1, 17)
61
#define CH32V20X_V30X_CLOCK_USART3 CH32V20X_V30X_CLOCK_CONFIG(APB1, 18)
62
#define CH32V20X_V30X_CLOCK_USART4 CH32V20X_V30X_CLOCK_CONFIG(APB1, 19)
63
#define CH32V20X_V30X_CLOCK_USART5 CH32V20X_V30X_CLOCK_CONFIG(APB1, 20)
64
#define CH32V20X_V30X_CLOCK_I2C1 CH32V20X_V30X_CLOCK_CONFIG(APB1, 21)
65
#define CH32V20X_V30X_CLOCK_I2C2 CH32V20X_V30X_CLOCK_CONFIG(APB1, 22)
66
#define CH32V20X_V30X_CLOCK_USBD CH32V20X_V30X_CLOCK_CONFIG(APB1, 23)
67
#define CH32V20X_V30X_CLOCK_CAN1 CH32V20X_V30X_CLOCK_CONFIG(APB1, 25)
68
#define CH32V20X_V30X_CLOCK_CAN2 CH32V20X_V30X_CLOCK_CONFIG(APB1, 26)
69
#define CH32V20X_V30X_CLOCK_BKP CH32V20X_V30X_CLOCK_CONFIG(APB1, 27)
70
#define CH32V20X_V30X_CLOCK_PWR CH32V20X_V30X_CLOCK_CONFIG(APB1, 28)
71
#define CH32V20X_V30X_CLOCK_DAC CH32V20X_V30X_CLOCK_CONFIG(APB1, 29)
72
73
#endif
zephyr
dt-bindings
clock
ch32v20x_30x-clocks.h
Generated on
for Zephyr API Documentation by
1.14.0