1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_CpuFill*</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_CpuFill* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"><B></B></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> <BR> <CODE>void MI_CpuFill8( void* dest, u8 data, u32 size );</CODE><BR> <CODE>void MI_CpuFill16( void* dest, u16 data, u32 size );</CODE><BR> <CODE>void MI_CpuFill32( void* dest, u32 data, u32 size );</CODE><BR> <CODE>void MI_CpuFillFast( void* dest, u32 data, u32 size );</CODE><BR> <CODE>void MI_CpuFill( void* dest, u8 data, u32 size );</CODE></dd> 20</dl> 21 22<h2>Arguments</h2> 23<TABLE border="1" width="100%"> 24 <TBODY> 25 <TR> 26<TD width="13%"><CODE>dest</CODE></TD> 27<TD width="87%">The transfer destination address</TD> 28 </TR> 29 <TR> 30<TD width="13%"><CODE>data</CODE></TD> 31<TD width="87%">The data that will be transferred</TD> 32 </TR> 33 <TR> 34<TD><CODE>size</CODE></TD> 35<TD>Transfer size 36 </TD> 37 </TR> 38 </TBODY> 39</TABLE> 40 41<h2>Return Values</h2> 42<p>None.</p> 43 44<H2>Description</H2> 45<P>This function uses the CPU to fill memory with specified data.</P> 46<P><code>MI_CpuFill8()</code> selects the most efficient memory access based on the transfer destination address, and then fills the memory with the specified data in 16-bit and 32-bit units, as appropriate. The alignment of the transfer destination address does not need to be considered.</P> 47<P><code>MI_CpuFill16()</code> fills the memory with specified data in 16-bit units. The transfer destination address must be 2-byte aligned.</P> 48<P><code>MI_CpuFill32()</code> fills the memory with specified data in 32-bit units. The transfer destination address must be 4-byte aligned.</P> 49<P><code>MI_CpuFillFast()</code> quickly fills the memory with the specified data in 32-byte units. The transfer destination address must be 4-byte aligned. The transfer size is an integral multiple of 4 bytes. It does not have to be an integral multiple of 32 bytes.</P> 50<P><CODE>MI_CpuFill()</CODE>, in the same manner as <CODE>MI_CpuFill8()</CODE>, selects the most efficient memory access based on the transfer destination address, and fills the memory with the specified data in 16-bit and 32-bit units, as appropriate. The alignment of the transfer destination address does not need to be considered. If the alignment and size are defined, we recommend that you divide calls between <CODE>MI_CpuFillFast</CODE> and <CODE>MI_CpuFill32</CODE>, as appropriate.</P> 51 52 53<h2>Internal Operation</h2> 54<P>Processing is done by the CPU only and does not use the DMA controller. It does not use a system call. The <CODE>MI_CpuFill8</CODE> function writes in units of 16 or 32 bits, so accessing VRAM directly will not cause problems.</P> 55<P>The <CODE>MI_CpuFill</CODE> function writes data in 8-bit units for some target addresses, so it should not be used when accessing VRAM directly. (It can be used in TWL mode if extended VRAM has been configured.)</P> 56 57<h2>See Also</h2> 58<p><code><a href="MI_CpuClear.html">MI_CpuClear*</a><BR><a href="MI_CpuCopy.html">MI_CpuCopy*</a><BR><a href="MI_CpuSend.html">MI_CpuSend*</a><BR><a href="../dma/MI_DmaFill.html">MI_DmaFill*</a></code></p> 59 60<H2>Revision History</H2> 61<P> 622008/09/01 Added <CODE>MI_CpuFill</CODE>. <BR>2004/04/29 Added a description of <CODE>MI_CpuFill8</CODE>. <BR>2004/03/29 Mentioned that system calls are not used. <BR>2003/12/01 Initial version.</P> 63<hr><p>CONFIDENTIAL</p></body> 64</html> 65