Skip to content

Commit

Permalink
Better to avoid transfer when len = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-D committed May 29, 2024
1 parent 40afedd commit 552749a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ u16 DMA_getQueueTransferSize()

bool DMA_transfer(TransferMethod tm, u8 location, void* from, u16 to, u16 len, u16 step)
{
// nothing to do (avoid transfering 65536 words when len = 0)
if (!len) return TRUE;

switch(tm)
{
// default = CPU transfer
Expand Down

0 comments on commit 552749a

Please sign in to comment.