1 /* 2 * Copyright (c) 2022 Andriy Gelman <andriy.gelman@gmail.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_DMA_INFINEON_XMC4XXX_DMA_H_ 8 #define ZEPHYR_INCLUDE_DT_BINDINGS_DMA_INFINEON_XMC4XXX_DMA_H_ 9 10 #define XMC4XXX_DMA_REQUEST_SOURCE_POS 0 11 #define XMC4XXX_DMA_REQUEST_SOURCE_MASK 0xf 12 13 #define XMC4XXX_DMA_LINE_POS 4 14 #define XMC4XXX_DMA_LINE_MASK 0xf 15 16 #define XMC4XXX_DMA_GET_REQUEST_SOURCE(mx) \ 17 ((mx >> XMC4XXX_DMA_REQUEST_SOURCE_POS) & XMC4XXX_DMA_REQUEST_SOURCE_MASK) 18 19 #define XMC4XXX_DMA_GET_LINE(mx) ((mx >> XMC4XXX_DMA_LINE_POS) & XMC4XXX_DMA_LINE_MASK) 20 21 #define XMC4XXX_SET_CONFIG(line, rs) \ 22 ((line) << XMC4XXX_DMA_LINE_POS | (rs) << XMC4XXX_DMA_REQUEST_SOURCE_POS) 23 24 #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_DMA_INFINEON_XMC4XXX_DMA_H_ */ 25