MT7687 API Reference  LinkIt SDK v4
hal_gdma.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __HAL_GDMA_H__
36 #define __HAL_GDMA_H__
37 #include "hal_platform.h"
38 
39 #ifdef HAL_GDMA_MODULE_ENABLED
40 
182 #ifdef __cplusplus
183 extern "C" {
184 #endif
185 
192 typedef enum {
198 
199 
201 typedef enum {
205 
206 
208 typedef enum {
212 
230 typedef void (*hal_gdma_callback_t)(hal_gdma_event_t event, void *user_data);
231 
246 
247 
259 
260 
274 hal_gdma_status_t hal_gdma_start_polling(hal_gdma_channel_t channel, uint32_t destination_address, uint32_t source_address, uint32_t data_length);
275 
276 
290 hal_gdma_status_t hal_gdma_start_interrupt(hal_gdma_channel_t channel, uint32_t destination_address, uint32_t source_address, uint32_t data_length);
291 
292 
304 
305 
320 
321 
334 
335 
336 #ifdef __cplusplus
337 }
338 #endif
339 
340 
346 #endif /*HAL_GDMA_MODULE_ENABLED*/
347 #endif /* __HAL_GDMA_H__ */
348 
349 
350 
351 
Invalid GDMA channel.
Definition: hal_gdma.h:194
GDMA transaction error occurred.
Definition: hal_gdma.h:202
GDMA transaction completed successfully.
Definition: hal_gdma.h:203
GDMA function error occurred.
Definition: hal_gdma.h:193
hal_gdma_status_t hal_gdma_start_interrupt(hal_gdma_channel_t channel, uint32_t destination_address, uint32_t source_address, uint32_t data_length)
This function enables the GDMA to operate in an interrupt mode, the application can register a callba...
hal_gdma_status_t hal_gdma_init(hal_gdma_channel_t channel)
This function initializes the GDMA based configuration.
hal_gdma_channel_t
gdma channel
Definition: hal_platform.h:671
hal_gdma_status_t hal_gdma_get_running_status(hal_gdma_channel_t channel, hal_gdma_running_status_t *running_status)
This function gets the current state of the GDMA.
GDMA idle.
Definition: hal_gdma.h:209
hal_gdma_running_status_t
GDMA current running status.
Definition: hal_gdma.h:208
hal_gdma_status_t hal_gdma_start_polling(hal_gdma_channel_t channel, uint32_t destination_address, uint32_t source_address, uint32_t data_length)
This function enables the GDMA to operate in a polling mode.
hal_gdma_event_t
GDMA transaction error.
Definition: hal_gdma.h:201
hal_gdma_status_t hal_gdma_register_callback(hal_gdma_channel_t channel, hal_gdma_callback_t callback, void *user_data)
This function registers a GDMA callback.
Invalid input parameter.
Definition: hal_gdma.h:195
hal_gdma_status_t hal_gdma_deinit(hal_gdma_channel_t channel)
This function resets GDMA registers and state.
hal_gdma_status_t
GDMA status.
Definition: hal_gdma.h:192
GDMA busy.
Definition: hal_gdma.h:210
hal_gdma_status_t hal_gdma_stop(hal_gdma_channel_t channel)
This function stops the GDMA operation.
GDMA completed successfully.
Definition: hal_gdma.h:196
void(* hal_gdma_callback_t)(hal_gdma_event_t event, void *user_data)
This defines the callback function prototype.
Definition: hal_gdma.h:230