RTEMS 6.1-rc1
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
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_LPUART_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 6, 0))
29/* Forward declaration of the handle typedef. */
31
35 status_t status,
36 void *userData);
37
42{
44 void *userData;
51 uint8_t nbytes;
53 volatile uint8_t txState;
54 volatile uint8_t rxState;
55};
56
57/*******************************************************************************
58 * API
59 ******************************************************************************/
60
61#if defined(__cplusplus)
62extern "C" {
63#endif
64
85 void *userData,
86 edma_handle_t *txEdmaHandle,
87 edma_handle_t *rxEdmaHandle);
88
103
118
128
138
153
167
179void LPUART_TransferEdmaHandleIRQ(LPUART_Type *base, void *lpuartEdmaHandle);
180
183#if defined(__cplusplus)
184}
185#endif
186
189#endif /* _FSL_LPUART_EDMA_H_ */
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
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
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
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
Definition: MIMXRT1052.h:31147
eDMA transfer handle structure
Definition: fsl_edma.h:244
LPUART eDMA handle.
Definition: fsl_lpuart_edma.h:42
LPUART transfer structure.
Definition: fsl_lpuart.h:267