RTEMS 6.3
Loading...
Searching...
No Matches
fsl_lpuart_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_LPUART_EDMA_H_
9#define _FSL_LPUART_EDMA_H_
10
11#include "fsl_lpuart.h"
12#include "fsl_edma.h"
13
18
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_LPUART_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 6, 0))
28
29/* Forward declaration of the handle typedef. */
30typedef struct _lpuart_edma_handle lpuart_edma_handle_t;
31
34 lpuart_edma_handle_t *handle,
35 status_t status,
36 void *userData);
37
56
57/*******************************************************************************
58 * API
59 ******************************************************************************/
60
61#if defined(__cplusplus)
62extern "C" {
63#endif
64
69
83 lpuart_edma_handle_t *handle,
85 void *userData,
86 edma_handle_t *txEdmaHandle,
87 edma_handle_t *rxEdmaHandle);
88
102status_t LPUART_SendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer);
103
117status_t LPUART_ReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer);
118
127void LPUART_TransferAbortSendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle);
128
137void LPUART_TransferAbortReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle);
138
152status_t LPUART_TransferGetSendCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count);
153
166status_t LPUART_TransferGetReceiveCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count);
167
179void LPUART_TransferEdmaHandleIRQ(LPUART_Type *base, void *lpuartEdmaHandle);
180
182
183#if defined(__cplusplus)
184}
185#endif
186
188
189#endif /* _FSL_LPUART_EDMA_H_ */
struct _edma_handle edma_handle_t
eDMA transfer handle structure
int32_t status_t
Type used for all status and error return values.
Definition fsl_common.h:225
struct _lpuart_transfer lpuart_transfer_t
LPUART transfer structure.
status_t LPUART_TransferGetSendCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count)
Gets the number of bytes written to the LPUART TX register.
Definition fsl_lpuart_edma.c:456
uint8_t nbytes
Definition fsl_lpuart_edma.h:51
void * userData
Definition fsl_lpuart_edma.h:44
size_t txDataSizeAll
Definition fsl_lpuart_edma.h:46
status_t LPUART_SendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer)
Sends data using eDMA.
Definition fsl_lpuart_edma.c:265
lpuart_edma_transfer_callback_t callback
Definition fsl_lpuart_edma.h:43
status_t LPUART_TransferGetReceiveCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count)
Gets the number of received bytes.
Definition fsl_lpuart_edma.c:425
void LPUART_TransferAbortSendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle)
Aborts the sent data using eDMA.
Definition fsl_lpuart_edma.c:377
void LPUART_TransferCreateHandleEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle)
Initializes the LPUART handle which is used in transactional functions.
Definition fsl_lpuart_edma.c:186
size_t rxDataSizeAll
Definition fsl_lpuart_edma.h:45
status_t LPUART_ReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer)
Receives data using eDMA.
Definition fsl_lpuart_edma.c:324
volatile uint8_t rxState
Definition fsl_lpuart_edma.h:54
edma_handle_t * rxEdmaHandle
Definition fsl_lpuart_edma.h:49
edma_handle_t * txEdmaHandle
Definition fsl_lpuart_edma.h:48
volatile uint8_t txState
Definition fsl_lpuart_edma.h:53
void LPUART_TransferEdmaHandleIRQ(LPUART_Type *base, void *lpuartEdmaHandle)
LPUART eDMA IRQ handle function.
Definition fsl_lpuart_edma.c:485
void LPUART_TransferAbortReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle)
Aborts the received data using eDMA.
Definition fsl_lpuart_edma.c:399
void(*) lpuart_edma_transfer_callback_t(LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData)
LPUART transfer callback function.
Definition fsl_lpuart_edma.h:33
Definition MIMXRT1052.h:31147
LPUART eDMA handle.
Definition fsl_lpuart_edma.h:42