Files @ 7476de768f19
Branch filter:

Location: therm/libraries/CMSIS/Documentation/SVD/html/group__register_section_extensions__gr.html - annotation

Ethan Zonca
Refactor of oled driver
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
f23a287bb7c1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CMSIS-SVD: Extensions to the Register Section</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="stylsheetf" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-SVD
   &#160;<span id="projectnumber">Version 1.10</span>
   </div>
   <div id="projectbrief">CMSIS System View Description</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li>
      <li><a href="../../Core/html/index.html"><span>CORE</span></a></li>
      <li><a href="../../DSP/html/index.html"><span>DSP</span></a></li>
      <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li>
      <li class="current"><a href="../../SVD/html/index.html"><span>SVD</span></a></li>
    </ul>
</div>
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__register_section_extensions__gr.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Extensions to the Register Section<div class="ingroups"><a class="el" href="group__svd___format__1__1__gr.html">SVD Extension in Version 1.1</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>The following elements have been added to the register section. All new elements are optional.</p>
<table  class="cmtable" summary="Register Section Extension Elements">
<tr>
<th nowrap="nowrap">Element Name </th><th>Description </th><th>Type </th><th>Occurrence  </th></tr>
<tr>
<td>alternateRegister </td><td>This tag can reference a register that has been defined above to current location in the description and that describes the memory location already. This tells the SVDConv's address checker that the redefinition of this particular register is intentional. The register name needs to be unique within the scope of the current peripheral. A register description is defined either for a unique address location or could be a redefinition of an already described address. In the latter case, the register can be either marked <em>alternateRegister</em> and needs to have a unique name, or it can have the same register name but is assigned to a register subgroup through the tag <em>alternateGroup</em> (specified in version 1.0). </td><td>identifierType  </td><td>0..1   </td></tr>
<tr>
<td>dataType </td><td>It can be useful to assign a specific native C datatype to a register. This helps avoiding type casts. For example, if a 32 bit register shall act as a pointer to a 32 bit unsigned data item, then <em>dataType</em> can be set to "uint32_t *". The following simple data types are predefined:<ul>
<li><span class="XML-Token">uint8_t</span>: unsigned byte</li>
<li><span class="XML-Token">uint16_t</span>: unsigned half word</li>
<li><span class="XML-Token">uint32_t</span>: unsigned word</li>
<li><span class="XML-Token">uint64_t</span>: unsigned double word</li>
<li><span class="XML-Token">int8_t</span>: signed byte</li>
<li><span class="XML-Token">int16_t</span>: signed half word</li>
<li><span class="XML-Token">int32_t</span>: signed world</li>
<li><span class="XML-Token">int64_t</span>: signed double word</li>
<li><span class="XML-Token">uint8_t *</span>: pointer to unsigned byte</li>
<li><span class="XML-Token">uint16_t *</span>: pointer to unsigned half word</li>
<li><span class="XML-Token">uint32_t *</span>: pointer to unsigned word</li>
<li><span class="XML-Token">uint64_t *</span>: pointer to unsigned double word</li>
<li><span class="XML-Token">int8_t *</span>: pointer to signed byte</li>
<li><span class="XML-Token">int16_t *</span>: pointer to signed half word</li>
<li><span class="XML-Token">int32_t *</span>: pointer to signed world</li>
<li><span class="XML-Token">int64_t *</span>: pointer to signed double word </li>
</ul>
</td><td>dataTypeType  </td><td>0..1   </td></tr>
</table>
<h1><a class="anchor" id="registerSection_ex"></a>
Example:</h1>
<div class="fragment"><div class="line">...</div>
<div class="line">&lt;<span class="keyword">register</span>&gt;</div>
<div class="line">    &lt;name&gt;TIM_MODEA&lt;/name&gt;</div>
<div class="line">    &lt;description&gt;In mode A <span class="keyword">this</span> <span class="keyword">register</span> acts as a reload value&lt;/description&gt;</div>
<div class="line">    &lt;addressOffset&gt;0xC&lt;/addressOffset&gt;</div>
<div class="line">&lt;/<span class="keyword">register</span>&gt;</div>
<div class="line">&lt;<span class="keyword">register</span>&gt;</div>
<div class="line">    &lt;name&gt;TIM_MODEB&lt;/name&gt;</div>
<div class="line">    &lt;description&gt;In mode B <span class="keyword">this</span> <span class="keyword">register</span> acts as the compare value&lt;/description&gt;</div>
<div class="line">    &lt;alternateRegister&gt;TIM_MODEA&lt;/alternateRegister&gt;</div>
<div class="line">    &lt;addressOffset&gt;0xC&lt;/addressOffset&gt;</div>
<div class="line">&lt;/<span class="keyword">register</span>&gt;     </div>
<div class="line">&lt;<span class="keyword">register</span>&gt;</div>
<div class="line">    &lt;name&gt;DMA_DATA&lt;/name&gt;</div>
<div class="line">    &lt;description&gt;This <span class="keyword">register</span> contains the address of the data being transferred&lt;/description&gt;</div>
<div class="line">    &lt;dataType&gt;uint32_t *&lt;/dataType&gt;</div>
<div class="line">    &lt;addressOffset&gt;0xf0&lt;/addressOffset&gt;</div>
<div class="line">&lt;/<span class="keyword">register</span>&gt;     </div>
<div class="line">...</div>
</div><!-- fragment --><p>This example describes two registers, TIM_MODEA and TIM_MODEB. Both have the same address offset. Based on the configured operation model being A or B, the register acts as reload or compare value. The register DMA_DATA is specified as a pointer to unsigned word data. The code generated for the device header file is:</p>
<div class="fragment"><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line">  <span class="keyword">union </span>{</div>
<div class="line">    __IO   uint32_t TIM_MODEA;</div>
<div class="line">    __IO   uint32_t TIM_MODEB;</div>
<div class="line">        };</div>
<div class="line">  __IO uint32_t * DMA_DATA; </div>
<div class="line">  ...</div>
<div class="line">} &lt;peripheral:name&gt;_Type;</div>
</div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 18 2013 13:38:02 for CMSIS-SVD by ARM Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 
	-->
	</li>
  </ul>
</div>
</body>
</html>