RTEMS 6.3
Loading...
Searching...
No Matches
fsl_flexio_uart_edma.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_EDMA_H_
9#define _FSL_FLEXIO_UART_EDMA_H_
10
11#include "fsl_flexio_uart.h"
12#include "fsl_edma.h"
13
18
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_FLEXIO_UART_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 4, 1))
28
29/* Forward declaration of the handle typedef. */
30typedef struct _flexio_uart_edma_handle flexio_uart_edma_handle_t;
31
34 flexio_uart_edma_handle_t *handle,
35 status_t status,
36 void *userData);
37
57
58/*******************************************************************************
59 * API
60 ******************************************************************************/
61
62#if defined(__cplusplus)
63extern "C" {
64#endif
65
70
84 flexio_uart_edma_handle_t *handle,
86 void *userData,
87 edma_handle_t *txEdmaHandle,
88 edma_handle_t *rxEdmaHandle);
89
103 flexio_uart_edma_handle_t *handle,
105
119 flexio_uart_edma_handle_t *handle,
121
130void FLEXIO_UART_TransferAbortSendEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle);
131
140void FLEXIO_UART_TransferAbortReceiveEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle);
141
153status_t FLEXIO_UART_TransferGetSendCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count);
154
167 flexio_uart_edma_handle_t *handle,
168 size_t *count);
169
171
172#if defined(__cplusplus)
173}
174#endif
175
177
178#endif /* _FSL_UART_EDMA_H_ */
struct _edma_handle edma_handle_t
eDMA transfer handle structure
edma_handle_t * txEdmaHandle
Definition fsl_flexio_uart_edma.h:49
volatile uint8_t txState
Definition fsl_flexio_uart_edma.h:54
void * userData
Definition fsl_flexio_uart_edma.h:44
status_t FLEXIO_UART_TransferCreateHandleEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle)
Initializes the UART handle which is used in transactional functions.
Definition fsl_flexio_uart_edma.c:139
void FLEXIO_UART_TransferAbortSendEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle)
Aborts the sent data which using eDMA.
Definition fsl_flexio_uart_edma.c:315
status_t FLEXIO_UART_TransferGetReceiveCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)
Gets the number of bytes received.
Definition fsl_flexio_uart_edma.c:360
size_t txDataSizeAll
Definition fsl_flexio_uart_edma.h:46
status_t FLEXIO_UART_TransferSendEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_transfer_t *xfer)
Sends data using eDMA.
Definition fsl_flexio_uart_edma.c:204
size_t rxDataSizeAll
Definition fsl_flexio_uart_edma.h:47
status_t FLEXIO_UART_TransferReceiveEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_transfer_t *xfer)
Receives data using eDMA.
Definition fsl_flexio_uart_edma.c:262
uint8_t nbytes
Definition fsl_flexio_uart_edma.h:52
void FLEXIO_UART_TransferAbortReceiveEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle)
Aborts the receive data which using eDMA.
Definition fsl_flexio_uart_edma.c:336
void(*) flexio_uart_edma_transfer_callback_t(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, status_t status, void *userData)
UART transfer callback function.
Definition fsl_flexio_uart_edma.h:33
edma_handle_t * rxEdmaHandle
Definition fsl_flexio_uart_edma.h:50
volatile uint8_t rxState
Definition fsl_flexio_uart_edma.h:55
status_t FLEXIO_UART_TransferGetSendCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)
Gets the number of bytes sent out.
Definition fsl_flexio_uart_edma.c:391
flexio_uart_edma_transfer_callback_t callback
Definition fsl_flexio_uart_edma.h:43
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 eDMA handle.
Definition fsl_flexio_uart_edma.h:42