Difference between revisions of "Template:Regsimple2/doc"

From WiiBrew
Jump to navigation Jump to search
(New page: {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template can be used for simple registers with two fields, especially where the fir...)
 
 
Line 15: Line 15:
  
 
=== See also ===
 
=== See also ===
[[Template:regsimple]]
+
*[[Template:regsimple]]
[[Template:reg8]]
+
*[[Template:reg8]]
[[Template:reg16]]
+
*[[Template:reg16]]
[[Template:reg32]]
+
*[[Template:reg32]]
  
 
<includeonly>
 
<includeonly>

Latest revision as of 17:46, 27 February 2009

This template can be used for simple registers with two fields, especially where the first field is just Unimplemented bits (i.e. registers where the top bits are unused).

Usage

{{regsimple2 | MAGIC_REGISTER | addr=0x1337 | bits=32 | split=24 | access = W}}

Gives:

MAGIC_REGISTER (0x1337)
  3124 230
Access U W


The width is adjusted automagically:

{{regsimple2 | MAGIC_REGISTER | addr=0x1337 | bits=32 | split=8 | access = W}}

MAGIC_REGISTER (0x1337)
  318 70
Access U W


See also