1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - MI
3 File: mi_dma_mainmem.c
4
5 Copyright 2003-2008 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Date:: 2008-10-16#$
14 $Rev: 8957 $
15 $Author: yada $
16 *---------------------------------------------------------------------------*/
17
18 #ifdef SDK_ARM9
19 #include <nitro.h>
20 #include "../include/mi_dma.h"
21
22 /*---------------------------------------------------------------------------*
23 Name: MI_DispMemDmaCopy
24
25 Description: main memory display DMA.
26
27 Arguments: dmaNo : DMA channel No.
28 src : source address
29
30 Returns: None
31 *---------------------------------------------------------------------------*/
MI_DispMemDmaCopy(u32 dmaNo,const void * src)32 void MI_DispMemDmaCopy(u32 dmaNo, const void *src)
33 {
34 MIi_ASSERT_DMANO(dmaNo);
35 MIi_ASSERT_SRC_ALIGN4(src);
36 MIi_WARNING_ADDRINTCM(src, 0x18000); // 0x18000=256*192*2(byte)
37
38 MIi_CheckAnotherAutoDMA(dmaNo, MI_DMA_TIMING_DISP_MMEM);
39 //---- check DMA0 source address
40 MIi_CheckDma0SourceAddress(dmaNo, (u32)src, 0x18000, MI_DMA_SRC_INC);
41
42 MIi_DmaSetParameters(dmaNo, (u32)src, (u32)REG_DISP_MMEM_FIFO_ADDR, MI_CNT_MMCOPY(0), 0);
43 }
44 #endif // SDK_ARM9
45