1 /******************************************************************************
2  *
3  * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
4  * Analog Devices, Inc.),
5  * Copyright (C) 2023-2024 Analog Devices, Inc.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************************/
20 
21 #ifndef LIBRARIES_PERIPHDRIVERS_SOURCE_DMA_DMA_REVB_H_
22 #define LIBRARIES_PERIPHDRIVERS_SOURCE_DMA_DMA_REVB_H_
23 
24 /****** Includes *******/
25 
26 /***** Definitions *****/
27 
28 /******* Globals *******/
29 
30 /****** Functions ******/
31 int MXC_DMA_RevB_Init(void);
32 int MXC_DMA_RevB_AcquireChannel(void);
33 int MXC_DMA_RevB_ReleaseChannel(int ch);
34 int MXC_DMA_RevB_ConfigChannel(mxc_dma_config_t config, mxc_dma_srcdst_t srcdst);
35 int MXC_DMA_RevB_AdvConfigChannel(mxc_dma_adv_config_t advConfig);
36 int MXC_DMA_RevB_SetSrcDst(mxc_dma_srcdst_t srcdst);
37 int MXC_DMA_RevB_GetSrcDst(mxc_dma_srcdst_t *srcdst);
38 int MXC_DMA_RevB_SetSrcReload(mxc_dma_srcdst_t srcdst);
39 int MXC_DMA_RevB_GetSrcReload(mxc_dma_srcdst_t *srcdst);
40 int MXC_DMA_RevB_SetCallback(int ch, void (*callback)(int, int));
41 int MXC_DMA_RevB_ChannelEnableInt(int ch, int flags);
42 int MXC_DMA_RevB_ChannelDisableInt(int ch, int flags);
43 int MXC_DMA_RevB_ChannelGetFlags(int ch);
44 int MXC_DMA_RevB_ChannelClearFlags(int ch, int flags);
45 int MXC_DMA_RevB_EnableInt(int ch);
46 int MXC_DMA_RevB_DisableInt(int ch);
47 int MXC_DMA_RevB_Start(int ch);
48 int MXC_DMA_RevB_Stop(int ch);
49 mxc_dma_ch_regs_t *MXC_DMA_RevB_GetCHRegs(int ch);
50 void MXC_DMA_RevB_Handler();
51 int MXC_DMA_RevB_MemCpy(void *dest, void *src, int len, mxc_dma_complete_cb_t callback);
52 int MXC_DMA_RevB_DoTransfer(mxc_dma_config_t config, mxc_dma_srcdst_t firstSrcDst,
53                             mxc_dma_trans_chain_t callback);
54 
55 #endif // LIBRARIES_PERIPHDRIVERS_SOURCE_DMA_DMA_REVB_H_
56