RTEMS 6.1-rc2
Loading...
Searching...
No Matches
fsl_flexspi_edma.h
1/*
2 * Copyright (c) 2016, Freescale Semiconductor, Inc.
3 * Copyright 2016-2020 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _FSL_FLEXSPI_EDMA_H_
10#define _FSL_FLEXSPI_EDMA_H_
11
12#include "fsl_flexspi.h"
13#if defined(FSL_FEATURE_SOC_DMAMUX_COUNT) && FSL_FEATURE_SOC_DMAMUX_COUNT
14#include "fsl_dmamux.h"
15#endif
16#include "fsl_edma.h"
17
23/*******************************************************************************
24 * Definitions
25 ******************************************************************************/
26
30#define FSL_FLEXSPI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 3, 2))
34
38 status_t status,
39 void *userData);
40
43{
50
53{
56 size_t transferSize;
58 uint8_t nbytes;
59 uint8_t count;
60 uint32_t state;
62 void *userData;
63};
64
65/*******************************************************************************
66 * APIs
67 ******************************************************************************/
68#if defined(__cplusplus)
69extern "C" {
70#endif
71
90 void *userData,
91 edma_handle_t *txDmaHandle,
92 edma_handle_t *rxDmaHandle);
93
104 flexspi_edma_handle_t *handle,
106
120
130
141
142/* @} */
143
144#if defined(__cplusplus)
145}
146#endif
147
148/* @} */
149
150#endif /* _FSL_FLEXSPI_EDMA_H_ */
status_t FLEXSPI_TransferEDMA(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_transfer_t *xfer)
Transfers FLEXSPI data using an eDMA non-blocking method.
Definition: fsl_flexspi_edma.c:161
_flexspi_edma_ntransfer_size
eDMA transfer configuration
Definition: fsl_flexspi_edma.h:43
uint32_t state
Definition: fsl_flexspi_edma.h:60
size_t transferSize
Definition: fsl_flexspi_edma.h:56
flexspi_edma_transfer_nsize_t nsize
Definition: fsl_flexspi_edma.h:57
void * userData
Definition: fsl_flexspi_edma.h:62
void FLEXSPI_TransferCreateHandleEDMA(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle, edma_handle_t *rxDmaHandle)
Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the call...
Definition: fsl_flexspi_edma.c:108
enum _flexspi_edma_ntransfer_size flexspi_edma_transfer_nsize_t
eDMA transfer configuration
void FLEXSPI_TransferAbortEDMA(FLEXSPI_Type *base, flexspi_edma_handle_t *handle)
Aborts the transfer data using eDMA.
Definition: fsl_flexspi_edma.c:315
flexspi_edma_callback_t completionCallback
Definition: fsl_flexspi_edma.h:61
void(* flexspi_edma_callback_t)(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, status_t status, void *userData)
FLEXSPI eDMA transfer callback function for finish and error.
Definition: fsl_flexspi_edma.h:36
edma_handle_t * txDmaHandle
Definition: fsl_flexspi_edma.h:54
status_t FLEXSPI_TransferGetTransferCountEDMA(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, size_t *count)
Gets the transferred counts of transfer.
Definition: fsl_flexspi_edma.c:334
void FLEXSPI_TransferUpdateSizeEDMA(FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_edma_transfer_nsize_t nsize)
Update FLEXSPI EDMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZ...
Definition: fsl_flexspi_edma.c:142
uint8_t nbytes
Definition: fsl_flexspi_edma.h:58
edma_handle_t * rxDmaHandle
Definition: fsl_flexspi_edma.h:55
uint8_t count
Definition: fsl_flexspi_edma.h:59
@ kFLEXPSI_EDMAnSize2Bytes
Definition: fsl_flexspi_edma.h:45
@ kFLEXPSI_EDMAnSize4Bytes
Definition: fsl_flexspi_edma.h:46
@ kFLEXPSI_EDMAnSize1Bytes
Definition: fsl_flexspi_edma.h:44
@ kFLEXPSI_EDMAnSize8Bytes
Definition: fsl_flexspi_edma.h:47
@ kFLEXPSI_EDMAnSize32Bytes
Definition: fsl_flexspi_edma.h:48
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
Definition: MIMXRT1052.h:21299
eDMA transfer handle structure
Definition: fsl_edma.h:244
FLEXSPI DMA transfer handle, users should not touch the content of the handle.
Definition: fsl_flexspi_edma.h:53
Transfer structure for FLEXSPI.
Definition: fsl_flexspi.h:317