Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dma_bee.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026, Realtek Semiconductor Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
15
16#ifndef ZEPHYR_INCLUDE_DRIVERS_DMA_BEE_H_
17#define ZEPHYR_INCLUDE_DRIVERS_DMA_BEE_H_
18
24
32#define BEE_DMA_CTLR(id, dir) DT_INST_DMAS_CTLR_BY_NAME(id, dir)
33
41#define BEE_DMA_CHANNEL_CONFIG(id, dir) DT_INST_DMAS_CELL_BY_NAME(id, dir, config)
42
43/* -------------------------------------------------------------------------- */
44/* Channel Configuration Extraction Macros */
45/* -------------------------------------------------------------------------- */
46
58#define BEE_DMA_CONFIG_DIRECTION(config) ((config >> 0) & 0x3)
59
71#define BEE_DMA_CONFIG_SOURCE_ADDR_INC(config) ((config >> 2) & 0x3)
72
84#define BEE_DMA_CONFIG_DESTINATION_ADDR_INC(config) ((config >> 4) & 0x3)
85
97#define BEE_DMA_CONFIG_SOURCE_DATA_SIZE(config) (1 << ((config >> 6) & 0x3))
98
110#define BEE_DMA_CONFIG_DESTINATION_DATA_SIZE(config) (1 << ((config >> 8) & 0x3))
111
129#define BEE_DMA_CONFIG_SOURCE_MSIZE(config) \
130 ((1 << (((config >> 10) & 0x7) + 1)) - (((config >> 10) & 0x7) == 0 ? 1 : 0))
131
149#define BEE_DMA_CONFIG_DESTINATION_MSIZE(config) \
150 ((1 << (((config >> 13) & 0x7) + 1)) - (((config >> 13) & 0x7) == 0 ? 1 : 0))
151
161#define BEE_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x1f)
162 /* End of dma_bee_macros group */
164
165#endif /* ZEPHYR_INCLUDE_DRIVERS_DMA_BEE_H_ */