Zephyr API Documentation
4.2.0-rc3
A Scalable Open Source RTOS
4.2.0-rc3
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
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
renesas
silabs
ambiq-apollo3-pinctrl.h
ambiq-apollo4-pinctrl.h
ambiq-apollo5-pinctrl.h
arm-mps2-pinctrl.h
arm-mps3-pinctrl.h
arm-mps4-pinctrl.h
arm-v2m_beetle-pinctrl.h
b91-pinctrl.h
cc13xx_cc26xx-pinctrl.h
cc23x0-pinctrl.h
ch32v003-pinctrl.h
ch32v00x-pinctrl.h
ch32v20x_30x-pinctrl.h
emsdp-pinctrl.h
ene-kb106x-pinctrl.h
ene-kb1200-pinctrl.h
esp-pinctrl-common.h
esp32-gpio-sigmap.h
esp32-pinctrl.h
esp32c2-gpio-sigmap.h
esp32c2-pinctrl.h
esp32c3-gpio-sigmap.h
esp32c3-pinctrl.h
esp32c6-gpio-sigmap.h
esp32c6-pinctrl.h
esp32s2-gpio-sigmap.h
esp32s2-pinctrl.h
esp32s3-gpio-sigmap.h
esp32s3-pinctrl.h
gecko-pinctrl-s1.h
gecko-pinctrl.h
ifx_cat1-pinctrl.h
imx8qm-pinctrl.h
imx8qxp-pinctrl.h
it8xxx2-pinctrl.h
lpc11u6x-pinctrl.h
max32-pinctrl.h
mchp-xec-pinctrl.h
mspm0-pinctrl.h
npcx-pinctrl.h
nrf-pinctrl.h
numaker-m46x-pinctrl.h
numicro-pinctrl.h
nxp-s32-pinctrl.h
pinctrl-zynq.h
pinctrl-zynqmp.h
quicklogic-eos-s3-pinctrl.h
realtek-rts5912-pinctrl.h
renesas-rzt2m-pinctrl.h
rpi-pico-pinctrl-common.h
rpi-pico-rp2040-pinctrl.h
rpi-pico-rp2350-pinctrl-common.h
rpi-pico-rp2350a-pinctrl.h
rpi-pico-rp2350b-pinctrl.h
rv32m1-pinctrl.h
si32-pinctrl.h
sifive-pinctrl.h
silabs-pinctrl-dbus.h
silabs-pinctrl-siwx91x.h
smartbond-pinctrl.h
stm32-pinctrl-common.h
stm32-pinctrl.h
stm32f1-afio.h
stm32f1-pinctrl.h
sy1xx-pinctrl.h
ti-cc32xx-pinctrl.h
ti-k3-pinctrl.h
xmc4xxx-pinctrl.h
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
stm32f1-afio.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Linaro Limited
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32F1_AFIO_H_
8
#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32F1_AFIO_H_
9
10
#define STM32_REMAP_REG_MASK 0x1U
11
#define STM32_REMAP_REG_SHIFT 0U
12
#define STM32_REMAP_SHIFT_MASK 0x1FU
13
#define STM32_REMAP_SHIFT_SHIFT 1U
14
#define STM32_REMAP_MASK_MASK 0x3U
15
#define STM32_REMAP_MASK_SHIFT 6U
16
#define STM32_REMAP_VAL_MASK 0x3U
17
#define STM32_REMAP_VAL_SHIFT 8U
18
32
#define STM32_REMAP(val, mask, shift, reg) \
33
((((reg) & STM32_REMAP_REG_MASK) << STM32_REMAP_REG_SHIFT) | \
34
(((shift) & STM32_REMAP_SHIFT_MASK) << STM32_REMAP_SHIFT_SHIFT) | \
35
(((mask) & STM32_REMAP_MASK_MASK) << STM32_REMAP_MASK_SHIFT) | \
36
(((val) & STM32_REMAP_VAL_MASK) << STM32_REMAP_VAL_SHIFT))
32
#define STM32_REMAP(val, mask, shift, reg) \
…
37
38
39
/* Accessors for remap value */
40
46
#define STM32_REMAP_REG_GET(remap) \
47
(((remap) >> STM32_REMAP_REG_SHIFT) & STM32_REMAP_REG_MASK)
46
#define STM32_REMAP_REG_GET(remap) \
…
48
54
#define STM32_REMAP_SHIFT_GET(remap) \
55
(((remap) >> STM32_REMAP_SHIFT_SHIFT) & STM32_REMAP_SHIFT_MASK)
54
#define STM32_REMAP_SHIFT_GET(remap) \
…
56
62
#define STM32_REMAP_MASK_GET(remap) \
63
(((remap) >> STM32_REMAP_MASK_SHIFT) & STM32_REMAP_MASK_MASK)
62
#define STM32_REMAP_MASK_GET(remap) \
…
64
70
#define STM32_REMAP_VAL_GET(remap) \
71
(((remap) >> STM32_REMAP_VAL_SHIFT) & STM32_REMAP_VAL_MASK)
70
#define STM32_REMAP_VAL_GET(remap) \
…
72
73
74
/* Remap values definitions, according to RM0008.pdf */
75
76
#define STM32_AFIO_MAPR 0U
77
#define STM32_AFIO_MAPR2 1U
78
80
#define NO_REMAP 0
81
83
#define SPI1_REMAP0 STM32_REMAP(0U, 0x1U, 0U, STM32_AFIO_MAPR)
85
#define SPI1_REMAP1 STM32_REMAP(1U, 0x1U, 0U, STM32_AFIO_MAPR)
86
88
#define I2C1_REMAP0 STM32_REMAP(0U, 0x1U, 1U, STM32_AFIO_MAPR)
90
#define I2C1_REMAP1 STM32_REMAP(1U, 0x1U, 1U, STM32_AFIO_MAPR)
91
93
#define USART1_REMAP0 STM32_REMAP(0U, 0x1U, 2U, STM32_AFIO_MAPR)
95
#define USART1_REMAP1 STM32_REMAP(1U, 0x1U, 2U, STM32_AFIO_MAPR)
96
98
#define USART2_REMAP0 STM32_REMAP(0U, 0x1U, 3U, STM32_AFIO_MAPR)
100
#define USART2_REMAP1 STM32_REMAP(1U, 0x1U, 3U, STM32_AFIO_MAPR)
101
103
#define USART3_REMAP0 STM32_REMAP(0U, 0x3U, 4U, STM32_AFIO_MAPR)
105
#define USART3_REMAP1 STM32_REMAP(1U, 0x3U, 4U, STM32_AFIO_MAPR)
107
#define USART3_REMAP2 STM32_REMAP(3U, 0x3U, 4U, STM32_AFIO_MAPR)
108
110
#define TIM1_REMAP0 STM32_REMAP(0U, 0x3U, 6U, STM32_AFIO_MAPR)
112
#define TIM1_REMAP1 STM32_REMAP(1U, 0x3U, 6U, STM32_AFIO_MAPR)
114
#define TIM1_REMAP2 STM32_REMAP(3U, 0x3U, 6U, STM32_AFIO_MAPR)
115
117
#define TIM2_REMAP0 STM32_REMAP(0U, 0x3U, 8U, STM32_AFIO_MAPR)
119
#define TIM2_REMAP1 STM32_REMAP(1U, 0x3U, 8U, STM32_AFIO_MAPR)
121
#define TIM2_REMAP2 STM32_REMAP(2U, 0x3U, 8U, STM32_AFIO_MAPR)
123
#define TIM2_REMAP3 STM32_REMAP(3U, 0x3U, 8U, STM32_AFIO_MAPR)
124
126
#define TIM3_REMAP0 STM32_REMAP(0U, 0x3U, 10U, STM32_AFIO_MAPR)
128
#define TIM3_REMAP1 STM32_REMAP(1U, 0x3U, 10U, STM32_AFIO_MAPR)
130
#define TIM3_REMAP2 STM32_REMAP(2U, 0x3U, 10U, STM32_AFIO_MAPR)
132
#define TIM3_REMAP3 STM32_REMAP(3U, 0x3U, 10U, STM32_AFIO_MAPR)
133
135
#define TIM4_REMAP0 STM32_REMAP(0U, 0x1U, 12U, STM32_AFIO_MAPR)
137
#define TIM4_REMAP1 STM32_REMAP(1U, 0x1U, 12U, STM32_AFIO_MAPR)
138
140
#define CAN_REMAP0 STM32_REMAP(0U, 0x3U, 13U, STM32_AFIO_MAPR)
142
#define CAN_REMAP1 STM32_REMAP(2U, 0x3U, 13U, STM32_AFIO_MAPR)
144
#define CAN_REMAP2 STM32_REMAP(3U, 0x3U, 13U, STM32_AFIO_MAPR)
145
147
#define CAN1_REMAP0 CAN_REMAP0
148
#define CAN1_REMAP1 CAN_REMAP1
149
#define CAN1_REMAP2 CAN_REMAP2
150
152
#define ETH_REMAP0 STM32_REMAP(0U, 0x1U, 21U, STM32_AFIO_MAPR)
154
#define ETH_REMAP1 STM32_REMAP(1U, 0x1U, 21U, STM32_AFIO_MAPR)
155
157
#define CAN2_REMAP0 STM32_REMAP(0U, 0x1U, 22U, STM32_AFIO_MAPR)
159
#define CAN2_REMAP1 STM32_REMAP(1U, 0x1U, 22U, STM32_AFIO_MAPR)
160
162
#define SPI3_REMAP0 STM32_REMAP(0U, 0x1U, 28U, STM32_AFIO_MAPR)
164
#define SPI3_REMAP1 STM32_REMAP(1U, 0x1U, 28U, STM32_AFIO_MAPR)
165
167
#define I2S3_REMAP0 SPI3_REMAP0
169
#define I2S3_REMAP1 SPI3_REMAP1
170
172
#define TIM9_REMAP0 STM32_REMAP(0U, 0x1U, 5U, STM32_AFIO_MAPR2)
174
#define TIM9_REMAP1 STM32_REMAP(1U, 0x1U, 5U, STM32_AFIO_MAPR2)
175
177
#define TIM10_REMAP0 STM32_REMAP(0U, 0x1U, 6U, STM32_AFIO_MAPR2)
179
#define TIM10_REMAP1 STM32_REMAP(1U, 0x1U, 6U, STM32_AFIO_MAPR2)
180
182
#define TIM11_REMAP0 STM32_REMAP(0U, 0x1U, 7U, STM32_AFIO_MAPR2)
184
#define TIM11_REMAP1 STM32_REMAP(1U, 0x1U, 7U, STM32_AFIO_MAPR2)
185
187
#define TIM13_REMAP0 STM32_REMAP(0U, 0x1U, 8U, STM32_AFIO_MAPR2)
189
#define TIM13_REMAP1 STM32_REMAP(1U, 0x1U, 8U, STM32_AFIO_MAPR2)
190
192
#define TIM14_REMAP0 STM32_REMAP(0U, 0x1U, 9U, STM32_AFIO_MAPR2)
194
#define TIM14_REMAP1 STM32_REMAP(1U, 0x1U, 9U, STM32_AFIO_MAPR2)
195
197
#define TIM15_REMAP0 STM32_REMAP(0U, 0x1U, 0U, STM32_AFIO_MAPR2)
199
#define TIM15_REMAP1 STM32_REMAP(1U, 0x1U, 0U, STM32_AFIO_MAPR2)
200
202
#define TIM16_REMAP0 STM32_REMAP(0U, 0x1U, 1U, STM32_AFIO_MAPR2)
204
#define TIM16_REMAP1 STM32_REMAP(1U, 0x1U, 1U, STM32_AFIO_MAPR2)
205
207
#define TIM17_REMAP0 STM32_REMAP(0U, 0x1U, 2U, STM32_AFIO_MAPR2)
209
#define TIM17_REMAP1 STM32_REMAP(1U, 0x1U, 2U, STM32_AFIO_MAPR2)
210
211
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_STM32F1_AFIO_H_ */
zephyr
dt-bindings
pinctrl
stm32f1-afio.h
Generated on
for Zephyr API Documentation by
1.14.0