Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dma_mcux_pxp.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_PXP_H_
8
#define ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_PXP_H_
9
10
#define DMA_MCUX_PXP_CMD_MASK 0xE0
11
#define DMA_MCUX_PXP_CMD_SHIFT 0x5
12
13
#define DMA_MCUX_PXP_FMT_MASK 0x1F
14
#define DMA_MCUX_PXP_FMT_SHIFT 0x0
15
16
/*
17
* In order to configure the PXP for rotation, the user should
18
* supply a format and command as the DMA slot parameter, like so:
19
* dma_slot = (DMA_MCUX_PXP_FTM(DMA_MCUX_PXP_FMT_RGB565) |
20
* DMA_MCUX_PXP_CMD(DMA_MCUX_PXP_CMD_ROTATE_90))
21
* head block source address: input buffer address
22
* head block destination address: output buffer address
23
* source data size: input buffer size in bytes
24
* source burst length: height of source buffer in pixels
25
* dest data size: output buffer size in bytes
26
* dest burst length: height of destination buffer in pixels
27
*/
28
29
#define DMA_MCUX_PXP_FMT(x) ((x << DMA_MCUX_PXP_FMT_SHIFT) & DMA_MCUX_PXP_FMT_MASK)
30
#define DMA_MCUX_PXP_CMD(x) ((x << DMA_MCUX_PXP_CMD_SHIFT) & DMA_MCUX_PXP_CMD_MASK)
31
32
#define DMA_MCUX_PXP_CMD_ROTATE_0 0
33
#define DMA_MCUX_PXP_CMD_ROTATE_90 1
34
#define DMA_MCUX_PXP_CMD_ROTATE_180 2
35
#define DMA_MCUX_PXP_CMD_ROTATE_270 3
36
37
#define DMA_MCUX_PXP_FMT_RGB565 0
38
#define DMA_MCUX_PXP_FMT_RGB888 1
39
#define DMA_MCUX_PXP_FMT_ARGB8888 2
40
41
#endif
/* ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_PXP_H_ */
zephyr
drivers
dma
dma_mcux_pxp.h
Generated on Thu Jul 4 2024 12:22:47 for Zephyr API Documentation by
1.9.6