RTEMS 6.3
Loading...
Searching...
No Matches
fsl_flexio_uart_dma.h
1/*
2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 * Copyright 2016-2020 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8#ifndef _FSL_FLEXIO_UART_DMA_H_
9#define _FSL_FLEXIO_UART_DMA_H_
10
11#include "fsl_flexio_uart.h"
12#include "fsl_dma.h"
13
18
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_FLEXIO_UART_DMA_DRIVER_VERSION (MAKE_VERSION(2, 4, 0))
28
29/* Forward declaration of the handle typedef. */
30typedef struct _flexio_uart_dma_handle flexio_uart_dma_handle_t;
31
34 flexio_uart_dma_handle_t *handle,
35 status_t status,
36 void *userData);
37
42{
44 void *userData;
45
48
49 dma_handle_t *txDmaHandle;
50 dma_handle_t *rxDmaHandle;
51
52 volatile uint8_t txState;
53 volatile uint8_t rxState;
54};
55
56/*******************************************************************************
57 * API
58 ******************************************************************************/
59
60#if defined(__cplusplus)
61extern "C" {
62#endif
63
68
82 flexio_uart_dma_handle_t *handle,
84 void *userData,
85 dma_handle_t *txDmaHandle,
86 dma_handle_t *rxDmaHandle);
87
101 flexio_uart_dma_handle_t *handle,
103
117 flexio_uart_dma_handle_t *handle,
119
128void FLEXIO_UART_TransferAbortSendDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle);
129
138void FLEXIO_UART_TransferAbortReceiveDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle);
139
151status_t FLEXIO_UART_TransferGetSendCountDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, size_t *count);
152
165 flexio_uart_dma_handle_t *handle,
166 size_t *count);
167
169
170#if defined(__cplusplus)
171}
172#endif
173
175
176#endif /* _FSL_UART_DMA_H_ */
volatile uint8_t txState
Definition fsl_flexio_uart_dma.h:52
void FLEXIO_UART_TransferAbortSendDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle)
Aborts the sent data which using DMA.
dma_handle_t * rxDmaHandle
Definition fsl_flexio_uart_dma.h:50
status_t FLEXIO_UART_TransferReceiveDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, flexio_uart_transfer_t *xfer)
Receives data using DMA.
size_t rxDataSizeAll
Definition fsl_flexio_uart_dma.h:47
dma_handle_t * txDmaHandle
Definition fsl_flexio_uart_dma.h:49
void * userData
Definition fsl_flexio_uart_dma.h:44
status_t FLEXIO_UART_TransferSendDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, flexio_uart_transfer_t *xfer)
Sends data using DMA.
status_t FLEXIO_UART_TransferGetSendCountDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, size_t *count)
Gets the number of bytes sent out.
void FLEXIO_UART_TransferAbortReceiveDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle)
Aborts the receive data which using DMA.
volatile uint8_t rxState
Definition fsl_flexio_uart_dma.h:53
status_t FLEXIO_UART_TransferGetReceiveCountDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, size_t *count)
Gets the number of bytes received.
flexio_uart_dma_transfer_callback_t callback
Definition fsl_flexio_uart_dma.h:43
void(*) flexio_uart_dma_transfer_callback_t(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, status_t status, void *userData)
UART transfer callback function.
Definition fsl_flexio_uart_dma.h:33
status_t FLEXIO_UART_TransferCreateHandleDMA(FLEXIO_UART_Type *base, flexio_uart_dma_handle_t *handle, flexio_uart_dma_transfer_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
Initializes the FLEXIO_UART handle which is used in transactional functions.
size_t txDataSizeAll
Definition fsl_flexio_uart_dma.h:46
struct _flexio_uart_type FLEXIO_UART_Type
Define FlexIO UART access structure typedef.
struct _flexio_uart_transfer flexio_uart_transfer_t
Define FlexIO UART transfer structure.
int32_t status_t
Type used for all status and error return values.
Definition fsl_common.h:225
UART DMA handle.
Definition fsl_flexio_uart_dma.h:42