Skip to content

Commit 8ea474e

Browse files
abonislawskinashif
authored andcommitted
dma: Status gives free bytes in buffer
Adds to the dma_status struct the number of free bytes available in the current transfer buffer. Signed-off-by: Adrian Bonislawski <[email protected]>
1 parent b19e8cf commit 8ea474e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/drivers/dma.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,14 @@ struct dma_config {
214214
* dir - DMA transfer direction
215215
* pending_length - data length pending to be transferred in bytes
216216
* or platform dependent.
217+
* free - free buffer space
217218
*
218219
*/
219220
struct dma_status {
220221
bool busy;
221222
enum dma_channel_direction dir;
222223
uint32_t pending_length;
224+
uint32_t free;
223225
};
224226

225227
/**

0 commit comments

Comments
 (0)