Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_dma.h
1 #ifndef _BC_DMA_H
2 #define _BC_DMA_H
3 
4 #include <bc_common.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
22 
25 
28 
31 
34 
36 
38 
39 typedef enum
40 {
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
90 
92 
93 typedef enum
94 {
97 
100 
102 
104 
105 typedef enum
106 {
109 
112 
115 
116 } bc_dma_size_t;
117 
119 
120 typedef enum
121 {
124 
127 
128 } bc_dma_mode_t;
129 
131 
132 typedef enum
133 {
136 
139 
142 
144 
146 
147 typedef enum
148 {
151 
154 
157 
160 
162 
164 
165 typedef struct
166 {
169 
172 
175 
178 
180  size_t length;
181 
184 
187 
190 
193 
195 
197 
198 void bc_dma_init(void);
199 
203 
205 
210 
211 void bc_dma_set_event_handler(bc_dma_channel_t channel, void (*event_handler)(bc_dma_channel_t, bc_dma_event_t, void *), void *event_param);
212 
215 
217 
220 
222 
223 size_t bc_dma_channel_get_length(bc_dma_channel_t channel);
224 
225 
227 
228 #endif // _BC_DMA_H
size_t length
DMA channel data length.
Definition: bc_dma.h:180
DMA channel configuration.
Definition: bc_dma.h:165
DMA channel 1.
Definition: bc_dma.h:15
DMA request 12.
Definition: bc_dma.h:78
DMA request 2.
Definition: bc_dma.h:48
DMA channel 4.
Definition: bc_dma.h:24
bc_dma_event_t
DMA channel event.
Definition: bc_dma.h:132
bc_dma_channel_t
DMA channels.
Definition: bc_dma.h:12
DMA channel data size 2B.
Definition: bc_dma.h:111
DMA request 1.
Definition: bc_dma.h:45
DMA request 14.
Definition: bc_dma.h:84
DMA channel priority is low.
Definition: bc_dma.h:150
void * address_peripheral
Peripheral address.
Definition: bc_dma.h:189
void bc_dma_set_event_handler(bc_dma_channel_t channel, void(*event_handler)(bc_dma_channel_t, bc_dma_event_t, void *), void *event_param)
Set callback function.
Definition: bc_dma.c:173
void * address_memory
RAM memory address.
Definition: bc_dma.h:186
DMA channel mode circular.
Definition: bc_dma.h:126
bc_dma_request_t request
DMA channel request.
Definition: bc_dma.h:168
bc_dma_direction_t direction
DMA channel direction.
Definition: bc_dma.h:171
DMA request 11.
Definition: bc_dma.h:75
void bc_dma_init(void)
Initialize DMA.
Definition: bc_dma.c:56
DMA channel direction from peripheral to RAM.
Definition: bc_dma.h:99
DMA channel 3.
Definition: bc_dma.h:21
DMA channel priority is medium.
Definition: bc_dma.h:153
bc_dma_priority_t
DMA channel priority.
Definition: bc_dma.h:147
void bc_dma_channel_run(bc_dma_channel_t channel)
Start DMA channel.
Definition: bc_dma.c:179
DMA request 7.
Definition: bc_dma.h:63
DMA channel direction from RAM to peripheral.
Definition: bc_dma.h:96
DMA channel event half done.
Definition: bc_dma.h:138
DMA channel 7.
Definition: bc_dma.h:33
bc_dma_direction_t
DMA channel directions.
Definition: bc_dma.h:93
DMA channel 2.
Definition: bc_dma.h:18
DMA channel priority is high.
Definition: bc_dma.h:156
DMA request 10.
Definition: bc_dma.h:72
DMA request 6.
Definition: bc_dma.h:60
DMA request 4.
Definition: bc_dma.h:54
bc_dma_request_t
DMA requests.
Definition: bc_dma.h:39
bc_dma_mode_t mode
DMA channel mode.
Definition: bc_dma.h:183
DMA channel data size 1B.
Definition: bc_dma.h:108
void bc_dma_channel_stop(bc_dma_channel_t channel)
Stop DMA channel.
Definition: bc_dma.c:184
DMA request 5.
Definition: bc_dma.h:57
bc_dma_priority_t priority
DMA channel priority.
Definition: bc_dma.h:192
DMA channel priority is very high.
Definition: bc_dma.h:159
DMA request 9.
Definition: bc_dma.h:69
DMA channel mode standard.
Definition: bc_dma.h:123
DMA request 8.
Definition: bc_dma.h:66
void bc_dma_channel_config(bc_dma_channel_t channel, bc_dma_channel_config_t *config)
Configure DMA channel.
Definition: bc_dma.c:95
bc_dma_size_t data_size_peripheral
DMA channel peripheral data size.
Definition: bc_dma.h:177
DMA channel data size 4B.
Definition: bc_dma.h:114
DMA channel event error.
Definition: bc_dma.h:135
bc_dma_size_t data_size_memory
DMA channel memory data size.
Definition: bc_dma.h:174
DMA request 13.
Definition: bc_dma.h:81
DMA request 0.
Definition: bc_dma.h:42
bc_dma_size_t
DMA channel data size.
Definition: bc_dma.h:105
DMA request 3.
Definition: bc_dma.h:51
DMA channel 6.
Definition: bc_dma.h:30
DMA request 15.
Definition: bc_dma.h:87
bc_dma_mode_t
DMA channel mode.
Definition: bc_dma.h:120
DMA channel 5, used for SPI.
Definition: bc_dma.h:27
DMA channel event done.
Definition: bc_dma.h:141