MI_DmaSend*

C Specification

#include <nitro/mi.h>
  
  void MI_DmaSend32( u32 dmaNo, const void* src, volatile void* dest, u32
  size );
  void MI_DmaSend16( u32 dmaNo, const void* src, volatile void* dest, u32
  size );
  
  void MI_DmaSend32Async( u32 dmaNo, const void* src, void* dest, u32 size,
                                               MIDmaCallback callback, void* arg );
  void MI_DmaSend16Async( u32 dmaNo, const void* src, void* dest, u32 size,
                                               MIDmaCallback callback, void* arg );

Arguments

dmaNo DMA channel used
src The transfer source address.
dest The transfer destination address.
size Transfer size
callback Callback when DMA ends.
arg Callback argument when DMA ends.

Return Values

None.

Description

Uses DMA to send data to the same address.
The function does not change the address of the transfer destination. It increments only the transfer origin address, and repeatedly transfers contiguous region data to the same address.

MI_DmaSend16() and MI_DmaSend16Async() transfer in 16-bit units. Both the transfer source address and the transfer destination address must be 2-byte aligned. MI_DmaSend32() and MI_DmaSend32Async() transfer in 32-bit units. Both the transfer source address and the transfer destination address must be 4-byte aligned.

MI_DmaSend16() and MI_DmaSend32() wait within the function until DMA completes. MI_DmaSend16Async() and MI_DmaSend32Async() call a callback function when DMA ends. The callback, callback, is a MIDmaCallback type (a void type function which takes one void* argument). callback is called from the system DMA interrupt handler and therefore is called while interrupts are prohibited.

It is necessary to understand how to use Async-type APIs in order to obtain maximum functionality.

Internal Operation

Uses the following IO registers: DMAn source register (0x40000B0 + 12n), DMAn destination register (0x40000B4 + 12n), and DMAn control register (0x40000B8 + 12n). n is the DMA channel used.))

See Also

MI_DmaCopy*, MI_DmaFill*, MI_DmaClear*, MI_CpuSend*

Revision History

03/08/2005 Standardized the Japanese term for "interrupt".
12/22/2004 Added a description regarding callback.
01/30/2004 Initial version

CONFIDENTIAL