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
silabs
atmel_samx7x_dma.h
ch32v003-dma.h
dma_smartbond.h
gd32_dma.h
infineon-xmc4xxx-dma.h
max32650_dma.h
max32655_dma.h
max32657_dma.h
max32660_dma.h
max32662_dma.h
max32666_dma.h
max32670_dma.h
max32672_dma.h
max32675_dma.h
max32680_dma.h
max32690_dma.h
max78000_dma.h
max78002_dma.h
renesas_rz_dma.h
rpi-pico-dma-common.h
rpi-pico-dma-rp2040.h
rpi-pico-dma-rp2350.h
stm32_dma.h
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
service.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
stm32_dma.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 STMicroelectronics
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_DMA_STM32_DMA_H_
7
#define ZEPHYR_INCLUDE_DT_BINDINGS_DMA_STM32_DMA_H_
8
14
#define STM32_DMA_CH_CFG_MODE(val) ((val & 0x1) << 5)
15
#define STM32_DMA_MODE_NORMAL STM32_DMA_CH_CFG_MODE(0)
16
#define STM32_DMA_MODE_CYCLIC STM32_DMA_CH_CFG_MODE(1)
17
19
#define STM32_DMA_CH_CFG_DIRECTION(val) ((val & 0x3) << 6)
20
#define STM32_DMA_MEMORY_TO_MEMORY STM32_DMA_CH_CFG_DIRECTION(0)
21
#define STM32_DMA_MEMORY_TO_PERIPH STM32_DMA_CH_CFG_DIRECTION(1)
22
#define STM32_DMA_PERIPH_TO_MEMORY STM32_DMA_CH_CFG_DIRECTION(2)
23
#define STM32_DMA_PERIPH_TO_PERIPH STM32_DMA_CH_CFG_DIRECTION(3)
24
26
#define STM32_DMA_CH_CFG_PERIPH_ADDR_INC(val) ((val & 0x1) << 9)
27
#define STM32_DMA_PERIPH_NO_INC STM32_DMA_CH_CFG_PERIPH_ADDR_INC(0)
28
#define STM32_DMA_PERIPH_INC STM32_DMA_CH_CFG_PERIPH_ADDR_INC(1)
29
31
#define STM32_DMA_CH_CFG_MEM_ADDR_INC(val) ((val & 0x1) << 10)
32
#define STM32_DMA_MEM_NO_INC STM32_DMA_CH_CFG_MEM_ADDR_INC(0)
33
#define STM32_DMA_MEM_INC STM32_DMA_CH_CFG_MEM_ADDR_INC(1)
34
36
#define STM32_DMA_CH_CFG_PERIPH_WIDTH(val) ((val & 0x3) << 11)
37
#define STM32_DMA_PERIPH_8BITS STM32_DMA_CH_CFG_PERIPH_WIDTH(0)
38
#define STM32_DMA_PERIPH_16BITS STM32_DMA_CH_CFG_PERIPH_WIDTH(1)
39
#define STM32_DMA_PERIPH_32BITS STM32_DMA_CH_CFG_PERIPH_WIDTH(2)
40
42
#define STM32_DMA_CH_CFG_MEM_WIDTH(val) ((val & 0x3) << 13)
43
#define STM32_DMA_MEM_8BITS STM32_DMA_CH_CFG_MEM_WIDTH(0)
44
#define STM32_DMA_MEM_16BITS STM32_DMA_CH_CFG_MEM_WIDTH(1)
45
#define STM32_DMA_MEM_32BITS STM32_DMA_CH_CFG_MEM_WIDTH(2)
46
48
#define STM32_DMA_CH_CFG_PERIPH_INC_FIXED(val) ((val & 0x1) << 15)
49
#define STM32_DMA_OFFSET_LINKED_BUS STM32_DMA_CH_CFG_PERIPH_INC_FIXED(0)
50
#define STM32_DMA_OFFSET_FIXED_4 STM32_DMA_CH_CFG_PERIPH_INC_FIXED(1)
51
53
#define STM32_DMA_CH_CFG_PRIORITY(val) ((val & 0x3) << 16)
54
#define STM32_DMA_PRIORITY_LOW STM32_DMA_CH_CFG_PRIORITY(0)
55
#define STM32_DMA_PRIORITY_MEDIUM STM32_DMA_CH_CFG_PRIORITY(1)
56
#define STM32_DMA_PRIORITY_HIGH STM32_DMA_CH_CFG_PRIORITY(2)
57
#define STM32_DMA_PRIORITY_VERY_HIGH STM32_DMA_CH_CFG_PRIORITY(3)
58
60
#define STM32_DMA_FIFO_1_4 0U
61
#define STM32_DMA_FIFO_HALF 1U
62
#define STM32_DMA_FIFO_3_4 2U
63
#define STM32_DMA_FIFO_FULL 3U
64
65
/* DMA usual combination for peripheral transfer */
66
#define STM32_DMA_PERIPH_TX (STM32_DMA_MEMORY_TO_PERIPH | STM32_DMA_MEM_INC)
67
#define STM32_DMA_PERIPH_RX (STM32_DMA_PERIPH_TO_MEMORY | STM32_DMA_MEM_INC)
68
69
#define STM32_DMA_16BITS (STM32_DMA_PERIPH_16BITS | STM32_DMA_MEM_16BITS)
70
72
73
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_DMA_STM32_DMA_H_ */
zephyr
dt-bindings
dma
stm32_dma.h
Generated on
for Zephyr API Documentation by
1.14.0