RTEMS 6.1-rc6
Loading...
Searching...
No Matches
fsl_lpi2c_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_LPI2C_EDMA_H_
9#define _FSL_LPI2C_EDMA_H_
10
11#include "fsl_lpi2c.h"
12#include "fsl_edma.h"
13
14/*******************************************************************************
15 * Definitions
16 ******************************************************************************/
17
21#define FSL_LPI2C_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 4, 1))
29/* Forward declaration of the transfer descriptor and handle typedefs. */
31
45 status_t completionStatus,
46 void *userData);
47
53{
55 bool isBusy;
56 uint8_t nbytes;
57 uint16_t commandBuffer[10];
61 void *userData;
65};
66
69/*******************************************************************************
70 * API
71 ******************************************************************************/
72
73#if defined(__cplusplus)
74extern "C" {
75#endif
76
84
104 edma_handle_t *rxDmaHandle,
105 edma_handle_t *txDmaHandle,
107 void *userData);
108
124 lpi2c_master_transfer_t *transfer);
125
136
149
154#if defined(__cplusplus)
155}
156#endif
157
158#endif /* _FSL_LPI2C_EDMA_H_ */
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
bool isBusy
Definition: fsl_lpi2c_edma.h:55
lpi2c_master_edma_transfer_callback_t completionCallback
Definition: fsl_lpi2c_edma.h:60
status_t LPI2C_MasterTransferAbortEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle)
Terminates a non-blocking LPI2C master transmission early.
Definition: fsl_lpi2c_edma.c:489
status_t LPI2C_MasterTransferEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, lpi2c_master_transfer_t *transfer)
Performs a non-blocking DMA-based transaction on the I2C bus.
Definition: fsl_lpi2c_edma.c:230
uint8_t nbytes
Definition: fsl_lpi2c_edma.h:56
edma_tcd_t tcds[3]
Definition: fsl_lpi2c_edma.h:64
void LPI2C_MasterCreateEDMAHandle(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle, lpi2c_master_edma_transfer_callback_t callback, void *userData)
Create a new handle for the LPI2C master DMA APIs.
Definition: fsl_lpi2c_edma.c:105
LPI2C_Type * base
Definition: fsl_lpi2c_edma.h:54
status_t LPI2C_MasterTransferGetCountEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, size_t *count)
Returns number of bytes transferred so far.
Definition: fsl_lpi2c_edma.c:439
void * userData
Definition: fsl_lpi2c_edma.h:61
lpi2c_master_transfer_t transfer
Definition: fsl_lpi2c_edma.h:59
edma_handle_t * tx
Definition: fsl_lpi2c_edma.h:63
edma_handle_t * rx
Definition: fsl_lpi2c_edma.h:62
uint16_t commandBuffer[10]
Definition: fsl_lpi2c_edma.h:57
void(* lpi2c_master_edma_transfer_callback_t)(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, status_t completionStatus, void *userData)
Master DMA completion callback function pointer type.
Definition: fsl_lpi2c_edma.h:43
Definition: MIMXRT1052.h:29282
eDMA transfer handle structure
Definition: fsl_edma.h:244
eDMA TCD.
Definition: fsl_edma.h:205
Driver handle for master DMA APIs.
Definition: fsl_lpi2c_edma.h:53
Non-blocking transfer descriptor structure.
Definition: fsl_lpi2c.h:233