Header file containing functions prototypes of DMA HAL library. More...
Go to the source code of this file.
Classes | |
struct | _dma_init |
DMA Configuration Structure definition. More... | |
struct | _dma_handle |
DMA handle Structure definition. More... | |
Typedefs | |
typedef struct _dma_init | dma_init_t |
DMA Configuration Structure definition. More... | |
typedef struct _dma_handle | dma_handle_t |
DMA handle Structure definition. More... | |
Enumerations | |
enum | hal_dma_state_t { HAL_DMA_STATE_RESET = 0x00U, HAL_DMA_STATE_READY = 0x01U, HAL_DMA_STATE_BUSY = 0x02U, HAL_DMA_STATE_TIMEOUT = 0x03U, HAL_DMA_STATE_ERROR = 0x04U } |
HAL DMA State Enumerations definition. More... | |
enum | dma_channel_t { DMA_Channel0 = 0U, DMA_Channel1 = 1U, DMA_Channel2 = 2U, DMA_Channel3 = 3U, DMA_Channel4 = 4U, DMA_Channel5 = 5U, DMA_Channel6 = 6U, DMA_Channel7 = 7U } |
HAL DMA Channel Enumerations definition. More... | |
enum | hal_dma_callback_id_t { HAL_DMA_XFER_TFR_CB_ID = 0x00, HAL_DMA_XFER_BLK_CB_ID = 0x01, HAL_DMA_XFER_ERROR_CB_ID = 0x02, HAL_DMA_XFER_ABORT_CB_ID = 0x03, HAL_DMA_XFER_ALL_CB_ID = 0x04 } |
HAL DMA Callback ID Enumerations definition. More... | |
Functions | |
hal_status_t | hal_dma_init (dma_handle_t *p_dma) |
Initialize the DMA according to the specified parameters in the dma_init_t and initialize the associated handle. More... | |
hal_status_t | hal_dma_deinit (dma_handle_t *p_dma) |
De-initialize the DMA peripheral. More... | |
hal_status_t | hal_dma_start (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length) |
Start the DMA Transfer. More... | |
hal_status_t | hal_dma_start_it (dma_handle_t *p_dma, uint32_t src_address, uint32_t dst_address, uint32_t data_length) |
Start the DMA Transfer with interrupt enabled. More... | |
hal_status_t | hal_dma_abort (dma_handle_t *p_dma) |
Abort the DMA Transfer. More... | |
hal_status_t | hal_dma_abort_it (dma_handle_t *p_dma) |
Aborts the DMA Transfer in Interrupt mode. More... | |
hal_status_t | hal_dma_poll_for_transfer (dma_handle_t *p_dma, uint32_t timeout) |
Polling for transfer complete. More... | |
void | hal_dma_irq_handler (dma_handle_t *p_dma) |
Handle DMA interrupt request. More... | |
hal_status_t | hal_dma_register_callback (dma_handle_t *p_dma, hal_dma_callback_id_t id, void(*callback)(dma_handle_t *p_dma)) |
Register callbacks. More... | |
hal_status_t | hal_dma_unregister_callback (dma_handle_t *p_dma, hal_dma_callback_id_t id) |
UnRegister callbacks. More... | |
hal_dma_state_t | hal_dma_get_state (dma_handle_t *p_dma) |
Return the DMA hande state. More... | |
uint32_t | hal_dma_get_error (dma_handle_t *p_dma) |
Return the DMA error code. More... | |
hal_status_t | hal_dma_suspend_reg (dma_handle_t *p_dma) |
Suspend some registers related to DMA configuration before sleep. More... | |
hal_status_t | hal_dma_resume_reg (dma_handle_t *p_dma) |
Restore some registers related to DMA configuration after sleep. This function must be used in conjunction with the hal_dma_resume_reg(). More... | |
Header file containing functions prototypes of DMA HAL library.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file gr55xx_hal_dma.h.