![]() |
RTEMS 7.0-rc1
|
This source file contains the implementation of the DMA allocator. More...
#include <bsp.h>#include <bsp/dma.h>#include <bsp/fatal.h>#include <inttypes.h>#include <rtems/bspIo.h>#include <rtems/sysinit.h>#include <stdio.h>#include <stdlib.h>#include <stm32h7/hal.h>Data Structures | |
| struct | stm32h7_dma_context |
Typedefs | |
| typedef struct stm32h7_dma_context | stm32h7_dma_context |
Functions | |
| DMA_HandleTypeDef * | stm32h7_dma_alloc (void *parent, uint32_t request_type, uint32_t direction, uint32_t priority) |
| Acquire a DMA channel. | |
| void | stm32h7_dma_free (DMA_HandleTypeDef *dma_channel) |
| Release a DMA channel. | |
This source file contains the implementation of the DMA allocator.
| DMA_HandleTypeDef * stm32h7_dma_alloc | ( | void * | parent, |
| uint32_t | request_type, | ||
| uint32_t | direction, | ||
| uint32_t | priority | ||
| ) |
Acquire a DMA channel.
This function returns a DMA channel that can be used for memory-to-memory, memory-to-peripheral, or peripheral-to-memory transactions. The returned DMA channel is reserved for exclusive use until it is released using stm32h7_dma_free().
| parent | A pointer to the parent structure that will temporarily own the allocated DMA channel. This should be a *_HandleTypeDef pointer such as SPI_HandleTypeDef |
| request_type | A DMA_Request_selection value defining the endpoints of the transfer |
| direction | A DMA_Data_transfer_direction value defining the direction of the transfer |
| priority | A DMA_Priority_level value defining the priority of the transfer |
| void stm32h7_dma_free | ( | DMA_HandleTypeDef * | dma_channel | ) |
Release a DMA channel.
This function tears down and releases a DMA channel allocated using stm32h7_dma_alloc().
| dma_channel | A DMA channel handle pointer |