RTEMS 6.1-rc1
fsl_lpuart_dma.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_LPUART_DMA_H_
9#define _FSL_LPUART_DMA_H_
10
11#include "fsl_lpuart.h"
12#include "fsl_dma.h"
13
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_LPUART_DMA_DRIVER_VERSION (MAKE_VERSION(2, 6, 0))
29/* Forward declaration of the handle typedef. */
31
34 lpuart_dma_handle_t *handle,
35 status_t status,
36 void *userData);
37
42{
44 void *userData;
48 dma_handle_t *txDmaHandle;
49 dma_handle_t *rxDmaHandle;
51 volatile uint8_t txState;
52 volatile uint8_t rxState;
53};
54
55/*******************************************************************************
56 * API
57 ******************************************************************************/
58
59#if defined(__cplusplus)
60extern "C" {
61#endif
62
81 lpuart_dma_handle_t *handle,
83 void *userData,
84 dma_handle_t *txDmaHandle,
85 dma_handle_t *rxDmaHandle);
86
101
116
126
136
151
165
176void LPUART_TransferDMAHandleIRQ(LPUART_Type *base, void *lpuartDmaHandle);
177
180#if defined(__cplusplus)
181}
182#endif
183
186#endif /* _FSL_LPUART_DMA_H_ */
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
volatile uint8_t txState
Definition: fsl_lpuart_dma.h:51
volatile uint8_t rxState
Definition: fsl_lpuart_dma.h:52
void LPUART_TransferAbortSendDMA(LPUART_Type *base, lpuart_dma_handle_t *handle)
Aborts the sent data using DMA.
void LPUART_TransferDMAHandleIRQ(LPUART_Type *base, void *lpuartDmaHandle)
LPUART DMA IRQ handle function.
dma_handle_t * rxDmaHandle
Definition: fsl_lpuart_dma.h:49
size_t txDataSizeAll
Definition: fsl_lpuart_dma.h:46
status_t LPUART_TransferSendDMA(LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_transfer_t *xfer)
Sends data using DMA.
lpuart_dma_transfer_callback_t callback
Definition: fsl_lpuart_dma.h:43
void * userData
Definition: fsl_lpuart_dma.h:44
size_t rxDataSizeAll
Definition: fsl_lpuart_dma.h:45
void(* lpuart_dma_transfer_callback_t)(LPUART_Type *base, lpuart_dma_handle_t *handle, status_t status, void *userData)
LPUART transfer callback function.
Definition: fsl_lpuart_dma.h:33
status_t LPUART_TransferGetReceiveCountDMA(LPUART_Type *base, lpuart_dma_handle_t *handle, uint32_t *count)
Gets the number of received bytes.
status_t LPUART_TransferReceiveDMA(LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_transfer_t *xfer)
Receives data using DMA.
void LPUART_TransferAbortReceiveDMA(LPUART_Type *base, lpuart_dma_handle_t *handle)
Aborts the received data using DMA.
void LPUART_TransferCreateHandleDMA(LPUART_Type *base, lpuart_dma_handle_t *handle, lpuart_dma_transfer_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
Initializes the LPUART handle which is used in transactional functions.
dma_handle_t * txDmaHandle
Definition: fsl_lpuart_dma.h:48
status_t LPUART_TransferGetSendCountDMA(LPUART_Type *base, lpuart_dma_handle_t *handle, uint32_t *count)
Gets the number of bytes written to the LPUART TX register.
Definition: MIMXRT1052.h:31147
LPUART DMA handle.
Definition: fsl_lpuart_dma.h:42
LPUART transfer structure.
Definition: fsl_lpuart.h:267