You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
204 lines
11 KiB
HTML
204 lines
11 KiB
HTML
4 years ago
|
<!-- HTML header for doxygen 1.8.7-->
|
||
|
<!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"/>
|
||
|
<meta name="generator" content="Doxygen 1.6.3"/>
|
||
|
<!--BEGIN PROJECT_NAME--><title>avr-libc: avr-libc: <avr/io.h>: AVR device-specific IO definitions</title><!--END PROJECT_NAME-->
|
||
|
<!--BEGIN !PROJECT_NAME--><title>avr-libc: <avr/io.h>: AVR device-specific IO definitions</title><!--END !PROJECT_NAME-->
|
||
|
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||
|
$treeview
|
||
|
$search
|
||
|
$mathjax
|
||
|
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||
|
$extrastylesheet
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
|
||
|
<!--BEGIN TITLEAREA-->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<!--BEGIN PROJECT_LOGO-->
|
||
|
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
|
||
|
<!--END PROJECT_LOGO-->
|
||
|
<!--BEGIN PROJECT_NAME-->
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">avr-libc
|
||
|
<!--BEGIN PROJECT_NUMBER--> <span id="projectnumber">2.0.0</span><!--END PROJECT_NUMBER-->
|
||
|
</div>
|
||
|
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||
|
</td>
|
||
|
<!--END PROJECT_NAME-->
|
||
|
<!--BEGIN !PROJECT_NAME-->
|
||
|
<!--BEGIN PROJECT_BRIEF-->
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectbrief">$projectbrief</div>
|
||
|
</td>
|
||
|
<!--END PROJECT_BRIEF-->
|
||
|
<!--END !PROJECT_NAME-->
|
||
|
<!--BEGIN DISABLE_INDEX-->
|
||
|
<!--BEGIN SEARCHENGINE-->
|
||
|
<td>$searchbox</td>
|
||
|
<!--END SEARCHENGINE-->
|
||
|
<!--END DISABLE_INDEX-->
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td align="left"><a href="http://www.nongnu.org/avr-libc/"><h2>AVR Libc Home Page</h2></a></td>
|
||
|
<td align="center" colspan=4><img src="avrs.png" alt="AVRs" align="middle" border="0"></td>
|
||
|
<td align="right"><a href="https://savannah.nongnu.org/projects/avr-libc/"><h2>AVR Libc Development Pages</h2></a></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td align="center" width="20%"><a href="index.html"><h2>Main Page</h2></a></td>
|
||
|
<td align="center" width="20%"><a href="pages.html"><h2>User Manual</h2></a></td>
|
||
|
<td align="center" width="20%"><a href="modules.html"><h2>Library Reference</h2></a></td>
|
||
|
<td align="center" width="20%"><a href="FAQ.html"><h2>FAQ</h2></a></td>
|
||
|
<td align="center" width="20%"><a href="group__demos.html"><h2>Example Projects</h2></a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!--END TITLEAREA-->
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.6.3 -->
|
||
|
<script type="text/javascript"><!--
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
--></script>
|
||
|
<div class="contents">
|
||
|
<h1><avr/io.h>: AVR device-specific IO definitions</h1><table border="0" cellpadding="0" cellspacing="0">
|
||
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__io.html#gaaaa396e67cc85f68fa0474d70edf3d4c">_PROTECTED_WRITE</a>(reg, value)</td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__avr__io.html#gaa908245395513b1c44d76b8feab3c4a4">_PROTECTED_WRITE_SPM</a>(reg, value)</td></tr>
|
||
|
</table>
|
||
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="io_8h.html">avr/io.h</a>></span>
|
||
|
</pre></div><p>This header file includes the apropriate IO definitions for the device that has been specified by the <code>-mmcu=</code> compiler command-line switch. This is done by diverting to the appropriate file <code><avr/io</code><em>XXXX</em><code>.h></code> which should never be included directly. Some register names common to all AVR devices are defined directly within <code><avr/common.h></code>, which is included in <code><<a class="el" href="io_8h.html">avr/io.h</a>></code>, but most of the details come from the respective include file.</p>
|
||
|
<p>Note that this file always includes the following files: </p>
|
||
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <avr/sfr_defs.h></span>
|
||
|
<span class="preprocessor"> #include <avr/portpins.h></span>
|
||
|
<span class="preprocessor"> #include <avr/common.h></span>
|
||
|
<span class="preprocessor"> #include <avr/version.h></span>
|
||
|
</pre></div><p> See <a class="el" href="group__avr__sfr.html"><avr/sfr_defs.h>: Special function registers</a> for more details about that header file.</p>
|
||
|
<p>Included are definitions of the IO register set and their respective bit values as specified in the Atmel documentation. Note that inconsistencies in naming conventions, so even identical functions sometimes get different names on different devices.</p>
|
||
|
<p>Also included are the specific names useable for interrupt function definitions as documented <a class="el" href="group__avr__interrupts.html#avr_signames">here</a>.</p>
|
||
|
<p>Finally, the following macros are defined:</p>
|
||
|
<ul>
|
||
|
<li><b>RAMEND</b> <br/>
|
||
|
The last on-chip RAM address. <br/>
|
||
|
</li>
|
||
|
<li><b>XRAMEND</b> <br/>
|
||
|
The last possible RAM location that is addressable. This is equal to RAMEND for devices that do not allow for external RAM. For devices that allow external RAM, this will be larger than RAMEND. <br/>
|
||
|
</li>
|
||
|
<li><b>E2END</b> <br/>
|
||
|
The last EEPROM address. <br/>
|
||
|
</li>
|
||
|
<li><b>FLASHEND</b> <br/>
|
||
|
The last byte address in the Flash program space. <br/>
|
||
|
</li>
|
||
|
<li><b>SPM_PAGESIZE</b> <br/>
|
||
|
For devices with bootloader support, the flash pagesize (in bytes) to be used for the <code>SPM</code> instruction.</li>
|
||
|
<li><b>E2PAGESIZE</b> <br/>
|
||
|
The size of the EEPROM page. </li>
|
||
|
</ul>
|
||
|
<hr/><h2>Define Documentation</h2>
|
||
|
<a class="anchor" id="gaaaa396e67cc85f68fa0474d70edf3d4c"></a><!-- doxytag: member="xmega.h::_PROTECTED_WRITE" ref="gaaaa396e67cc85f68fa0474d70edf3d4c" args="(reg, value)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define _PROTECTED_WRITE</td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">reg, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">value </td>
|
||
|
<td class="paramname"></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Write value <code>value</code> to IO register <code>reg</code> that is protected through the Xmega configuration change protection (CCP) mechanism. This implements the timed sequence that is required for CCP.</p>
|
||
|
<p>Example to modify the CPU clock: </p>
|
||
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="io_8h.html">avr/io.h</a>></span>
|
||
|
|
||
|
<a class="code" href="group__avr__io.html#gaaaa396e67cc85f68fa0474d70edf3d4c">_PROTECTED_WRITE</a>(CLK_PSCTRL, CLK_PSADIV0_bm);
|
||
|
<a class="code" href="group__avr__io.html#gaaaa396e67cc85f68fa0474d70edf3d4c">_PROTECTED_WRITE</a>(CLK_CTRL, CLK_SCLKSEL0_bm);
|
||
|
</pre></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gaa908245395513b1c44d76b8feab3c4a4"></a><!-- doxytag: member="xmega.h::_PROTECTED_WRITE_SPM" ref="gaa908245395513b1c44d76b8feab3c4a4" args="(reg, value)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define _PROTECTED_WRITE_SPM</td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">reg, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">value </td>
|
||
|
<td class="paramname"></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
<p>Write value <code>value</code> to register <code>reg</code> that is protected through the Xmega configuration change protection (CCP) key for self programming (SPM). This implements the timed sequence that is required for CCP.</p>
|
||
|
<p>Example to modify the CPU clock: </p>
|
||
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <<a class="code" href="io_8h.html">avr/io.h</a>></span>
|
||
|
|
||
|
<a class="code" href="group__avr__io.html#gaa908245395513b1c44d76b8feab3c4a4">_PROTECTED_WRITE_SPM</a>(NVMCTRL_CTRLA, NVMCTRL_CMD_PAGEERASEWRITE_gc);
|
||
|
</pre></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Defines</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<!-- HTML footer for doxygen 1.8.7-->
|
||
|
<!-- start footer part -->
|
||
|
<!--BEGIN GENERATE_TREEVIEW-->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
$navpath
|
||
|
<li class="footer">$generatedby
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> 1.6.3 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<!--END GENERATE_TREEVIEW-->
|
||
|
<!--BEGIN !GENERATE_TREEVIEW-->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
$generatedby  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.6.3
|
||
|
</small></address>
|
||
|
<!--END !GENERATE_TREEVIEW-->
|
||
|
</body>
|
||
|
</html>
|