Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_platform_dma.h
Go to the documentation of this file.
1 #ifndef _BFLB_PLATFORM_DMA_H
2 #define _BFLB_PLATFORM_DMA_H
3 
4 #include "bflb_core.h"
5 
10 #define PLFM_DMA_CHANNEL_MAX 5
11 
19  uint32_t src;
22  uint32_t dest;
24  uint16_t length;
26  uint16_t ctrl;
28  uint32_t next;
29 };
30 
36  volatile struct bflb_platform_dma_desc *last_dma[PLFM_DMA_CHANNEL_MAX];
37 };
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
50 void bflb_platform_dma_init(struct bflb_device_s *dev);
51 
62 void bflb_platform_dma_push(struct bflb_device_s *dev, struct bflb_platform_dma_desc *first, struct bflb_platform_dma_desc *last);
63 
73 
82 
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
104 #endif
void bflb_platform_dma_buserr_isr(struct bflb_device_s *dev)
Interrupt service routine when a bus error is detected while in a DMA transfer. This error is conside...
uint16_t ctrl
Control word for the DMA engine (e.g. for interrupt generation)
void bflb_platform_dma_clear_eot(struct bflb_device_s *dev)
Active wait until DMA channel become inactive.
void bflb_platform_dma_init(struct bflb_device_s *dev)
Initialize the bridge DMA registers.
void bflb_platform_dma_wait_eot(struct bflb_device_s *dev)
Active wait until DMA channel become inactive.
Structure describing the DMA driver environment.
uint16_t length
Complete length of the buffer in memory.
void bflb_platform_dma_push(struct bflb_device_s *dev, struct bflb_platform_dma_desc *first, struct bflb_platform_dma_desc *last)
Chains a chained list of descriptors in the DMA.
#define PLFM_DMA_CHANNEL_MAX
uint32_t next
Pointer to the next element of the chained list.