Line data Source code
1 0 : /*
2 : * Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@gmail.com>
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : */
6 :
7 : #ifndef ZEPHYR_INCLUDE_DRIVERS_DMA_GD32_H_
8 : #define ZEPHYR_INCLUDE_DRIVERS_DMA_GD32_H_
9 :
10 0 : #define GD32_DMA_CONFIG_DIRECTION(config) ((config >> 6) & 0x3)
11 0 : #define GD32_DMA_CONFIG_PERIPH_ADDR_INC(config) ((config >> 9) & 0x1)
12 0 : #define GD32_DMA_CONFIG_MEMORY_ADDR_INC(config) ((config >> 10) & 0x1)
13 0 : #define GD32_DMA_CONFIG_PERIPH_WIDTH(config) ((config >> 11) & 0x3)
14 0 : #define GD32_DMA_CONFIG_MEMORY_WIDTH(config) ((config >> 13) & 0x3)
15 0 : #define GD32_DMA_CONFIG_PERIPHERAL_INC_FIXED(config) ((config >> 15) & 0x1)
16 0 : #define GD32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
17 :
18 0 : #define GD32_DMA_FEATURES_FIFO_THRESHOLD(threshold) (threshold & 0x3)
19 :
20 : #endif /* ZEPHYR_INCLUDE_DRIVERS_DMA_GD32_H_ */
|