RTEMS 6.1-rc5
Loading...
Searching...
No Matches
fsl_flexcan_edma.h
1/*
2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 * Copyright 2016-2022 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8#ifndef _FSL_FLEXCAN_EDMA_H_
9#define _FSL_FLEXCAN_EDMA_H_
10
11#include "fsl_flexcan.h"
12#include "fsl_edma.h"
13
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_FLEXCAN_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 9, 2))
29/* Forward declaration of the handle typedef. */
31
35 status_t status,
36 void *userData);
37
42{
44 void *userData;
46 volatile uint8_t rxFifoState;
47 size_t frameNum;
48#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
49 flexcan_fd_frame_t *framefd;
50#endif
51};
52
53/*******************************************************************************
54 * API
55 ******************************************************************************/
56
57#if defined(__cplusplus)
58extern "C" {
59#endif
60
78 void *userData,
79 edma_handle_t *rxFifoEdmaHandle);
80
92 flexcan_fifo_transfer_t *pFifoXfer,
93 edma_transfer_config_t *pEdmaConfig);
94
107 flexcan_edma_handle_t *handle,
108 edma_transfer_config_t *pEdmaConfig);
109
123 flexcan_edma_handle_t *handle,
124 flexcan_fifo_transfer_t *pFifoXfer);
145
146#if (defined(FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO) && FSL_FEATURE_FLEXCAN_HAS_ENHANCED_RX_FIFO)
159status_t FLEXCAN_TransferReceiveEnhancedFifoEDMA(CAN_Type *base,
160 flexcan_edma_handle_t *handle,
161 flexcan_fifo_transfer_t *pFifoXfer);
172static inline status_t FLEXCAN_TransferGetReceiveEnhancedFifoCountEMDA(CAN_Type *base,
173 flexcan_edma_handle_t *handle,
174 size_t *count)
175{
176 return FLEXCAN_TransferGetReceiveFifoCountEMDA(base, handle, count);
177}
178#endif
179
182#if defined(__cplusplus)
183}
184#endif
185
188#endif /* _FSL_FLEXCAN_EDMA_H_ */
flexcan_edma_transfer_callback_t callback
Definition: fsl_flexcan_edma.h:43
void FLEXCAN_TransferCreateHandleEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_edma_transfer_callback_t callback, void *userData, edma_handle_t *rxFifoEdmaHandle)
Initializes the FlexCAN handle, which is used in transactional functions.
status_t FLEXCAN_TransferGetReceiveFifoCountEMDA(CAN_Type *base, flexcan_edma_handle_t *handle, size_t *count)
Gets the Legacy Rx Fifo transfer status during a interrupt non-blocking receive.
void FLEXCAN_TransferAbortReceiveFifoEDMA(CAN_Type *base, flexcan_edma_handle_t *handle)
Aborts the receive Legacy/Enhanced Rx FIFO process which used eDMA.
void * userData
Definition: fsl_flexcan_edma.h:44
void FLEXCAN_PrepareTransfConfiguration(CAN_Type *base, flexcan_fifo_transfer_t *pFifoXfer, edma_transfer_config_t *pEdmaConfig)
Prepares the eDMA transfer configuration for FLEXCAN Legacy RX FIFO.
status_t FLEXCAN_StartTransferDatafromRxFIFO(CAN_Type *base, flexcan_edma_handle_t *handle, edma_transfer_config_t *pEdmaConfig)
Start Transfer Data from the FLEXCAN Legacy Rx FIFO using eDMA.
edma_handle_t * rxFifoEdmaHandle
Definition: fsl_flexcan_edma.h:45
size_t frameNum
Definition: fsl_flexcan_edma.h:47
volatile uint8_t rxFifoState
Definition: fsl_flexcan_edma.h:46
void(* flexcan_edma_transfer_callback_t)(CAN_Type *base, flexcan_edma_handle_t *handle, status_t status, void *userData)
FlexCAN transfer callback function.
Definition: fsl_flexcan_edma.h:33
status_t FLEXCAN_TransferReceiveFifoEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)
Receives the CAN Message from the Legacy Rx FIFO using eDMA.
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
Definition: MIMXRT1052.h:4122
eDMA transfer handle structure
Definition: fsl_edma.h:244
eDMA transfer configuration
Definition: fsl_edma.h:169
FlexCAN eDMA handle.
Definition: fsl_flexcan_edma.h:42
FlexCAN Rx FIFO transfer.
Definition: fsl_flexcan.h:1016