app_dma.h
Go to the documentation of this file.
1
52 #ifndef _APP_DMA_H_
53 #define _APP_DMA_H_
54
55 #include "gr55xx_hal.h"
56 #include "app_drv_error.h"
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 #ifdef HAL_DMA_MODULE_ENABLED
63
70 typedef int16_t dma_id_t;
79 typedef enum
80 {
81 APP_DMA_EVT_ERROR,
82 APP_DMA_EVT_TFR,
83 } app_dma_evt_type_t;
92 typedef struct
93 {
94 dma_channel_t channel_number;
95 dma_init_t init;
96 } app_dma_params_t;
105 typedef void (*app_dma_evt_handler_t)(app_dma_evt_type_t type);
106
110 /* Exported functions --------------------------------------------------------*/
126 dma_id_t app_dma_init(app_dma_params_t *p_params, app_dma_evt_handler_t evt_handler);
127
137 uint16_t app_dma_deinit(dma_id_t ins_id);
138
149 uint16_t app_dma_start(dma_id_t id, uint32_t src_address, uint32_t dst_address, uint32_t data_length);
150
160 dma_handle_t *app_dma_get_handle(dma_id_t id);
161
162 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
163
172 void dma_wake_up(dma_id_t id);
173 #endif
174
175
178 #endif
179
180 #ifdef __cplusplus
181 }
182 #endif
183
184 #endif
185
app_dma_get_handle
dma_handle_t * app_dma_get_handle(dma_id_t id)
Return the DMA handle.
_dma_init
DMA Configuration Structure definition.
Definition: gr55xx_hal_dma.h:137
app_dma_params_t
DMA parameters structure definition.
Definition: app_dma.h:93
app_dma_evt_handler_t
void(* app_dma_evt_handler_t)(app_dma_evt_type_t type)
DMA event callback definition.
Definition: app_dma.h:105
APP_DMA_EVT_TFR
@ APP_DMA_EVT_TFR
Definition: app_dma.h:82
app_dma_params_t::channel_number
dma_channel_t channel_number
Definition: app_dma.h:94
app_dma_params_t::init
dma_init_t init
Definition: app_dma.h:95
app_dma_deinit
uint16_t app_dma_deinit(dma_id_t ins_id)
De-initialize the APP ADC DRIVER peripheral.
app_dma_start
uint16_t app_dma_start(dma_id_t id, uint32_t src_address, uint32_t dst_address, uint32_t data_length)
Start the DMA Transfer.
app_dma_evt_type_t
app_dma_evt_type_t
DMA event Enumerations definition.
Definition: app_dma.h:80
gr55xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
APP_DMA_EVT_ERROR
@ APP_DMA_EVT_ERROR
Definition: app_dma.h:81
app_dma_init
dma_id_t app_dma_init(app_dma_params_t *p_params, app_dma_evt_handler_t evt_handler)
Initialize the APP DMA DRIVER according to the specified parameters in the app_dma_params_t and app_d...
app_drv_error.h
Header file of app driver error code.
_dma_handle
DMA handle Structure definition.
Definition: gr55xx_hal_dma.h:179
dma_id_t
int16_t dma_id_t
DMA id definition.
Definition: app_dma.h:70
dma_channel_t
dma_channel_t
HAL DMA Channel Enumerations definition.
Definition: gr55xx_hal_dma.h:93