|
1 | 1 | /*
|
2 | 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc.
|
3 |
| - * Copyright 2016-2017 NXP |
| 3 | + * Copyright 2016-2018 NXP |
| 4 | + * All rights reserved. |
4 | 5 | *
|
5 |
| - * Redistribution and use in source and binary forms, with or without modification, |
6 |
| - * are permitted provided that the following conditions are met: |
7 |
| - * |
8 |
| - * o Redistributions of source code must retain the above copyright notice, this list |
9 |
| - * of conditions and the following disclaimer. |
10 |
| - * |
11 |
| - * o Redistributions in binary form must reproduce the above copyright notice, this |
12 |
| - * list of conditions and the following disclaimer in the documentation and/or |
13 |
| - * other materials provided with the distribution. |
14 |
| - * |
15 |
| - * o Neither the name of the copyright holder nor the names of its |
16 |
| - * contributors may be used to endorse or promote products derived from this |
17 |
| - * software without specific prior written permission. |
18 |
| - * |
19 |
| - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
20 |
| - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
21 |
| - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
22 |
| - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
23 |
| - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
24 |
| - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
25 |
| - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
26 |
| - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 |
| - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
28 |
| - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 6 | + * SPDX-License-Identifier: BSD-3-Clause |
29 | 7 | */
|
30 | 8 | #ifndef _FSL_DSPI_EDMA_H_
|
31 | 9 | #define _FSL_DSPI_EDMA_H_
|
|
41 | 19 | * Definitions
|
42 | 20 | **********************************************************************************************************************/
|
43 | 21 |
|
| 22 | +/*! @name Driver version */ |
| 23 | +/*@{*/ |
| 24 | +/*! @brief DSPI EDMA driver version 2.2.2. */ |
| 25 | +#define FSL_DSPI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 2, 2)) |
| 26 | +/*@}*/ |
| 27 | + |
44 | 28 | /*!
|
45 |
| -* @brief Forward declaration of the DSPI eDMA master handle typedefs. |
46 |
| -*/ |
| 29 | + * @brief Forward declaration of the DSPI eDMA master handle typedefs. |
| 30 | + */ |
47 | 31 | typedef struct _dspi_master_edma_handle dspi_master_edma_handle_t;
|
48 | 32 |
|
49 | 33 | /*!
|
50 |
| -* @brief Forward declaration of the DSPI eDMA slave handle typedefs. |
51 |
| -*/ |
| 34 | + * @brief Forward declaration of the DSPI eDMA slave handle typedefs. |
| 35 | + */ |
52 | 36 | typedef struct _dspi_slave_edma_handle dspi_slave_edma_handle_t;
|
53 | 37 |
|
54 | 38 | /*!
|
@@ -186,6 +170,21 @@ void DSPI_MasterTransferCreateHandleEDMA(SPI_Type *base,
|
186 | 170 | */
|
187 | 171 | status_t DSPI_MasterTransferEDMA(SPI_Type *base, dspi_master_edma_handle_t *handle, dspi_transfer_t *transfer);
|
188 | 172 |
|
| 173 | +/*! |
| 174 | + * @brief Transfers a block of data using a eDMA method. |
| 175 | + * |
| 176 | + * This function transfers data using eDNA, the transfer mechanism is half-duplex. This is a non-blocking function, |
| 177 | + * which returns right away. When all data is transferred, the callback function is called. |
| 178 | + * |
| 179 | + * @param base DSPI base pointer |
| 180 | + * @param handle A pointer to the dspi_master_edma_handle_t structure which stores the transfer state. |
| 181 | + * @param transfer A pointer to the dspi_half_duplex_transfer_t structure. |
| 182 | + * @return status of status_t. |
| 183 | + */ |
| 184 | +status_t DSPI_MasterHalfDuplexTransferEDMA(SPI_Type *base, |
| 185 | + dspi_master_edma_handle_t *handle, |
| 186 | + dspi_half_duplex_transfer_t *xfer); |
| 187 | + |
189 | 188 | /*!
|
190 | 189 | * @brief DSPI master aborts a transfer which is using eDMA.
|
191 | 190 | *
|
|
0 commit comments