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.
350 lines
19 KiB
HTML
350 lines
19 KiB
HTML
<!-- 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: <compat/deprecated.h>: Deprecated items</title><!--END PROJECT_NAME-->
|
|
<!--BEGIN !PROJECT_NAME--><title>avr-libc: <compat/deprecated.h>: Deprecated items</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><compat/deprecated.h>: Deprecated items</h1><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>Allowing specific system-wide interrupts</h2></td></tr>
|
|
<tr><td colspan="2"><p><a class="anchor" id="amgrp193128e5bbdec1bc980f5611231d3b55"></a> In addition to globally enabling interrupts, each device's particular interrupt needs to be enabled separately if interrupts for this device are desired. While some devices maintain their interrupt enable bit inside the device's register set, external and timer interrupts have system-wide configuration registers.</p>
|
|
<p>Example:</p>
|
|
<div class="fragment"><pre class="fragment"> <span class="comment">// Enable timer 1 overflow interrupts.</span>
|
|
<a class="code" href="group__deprecated__items.html#ga46f0b87ccc2ab63dea1ff28207270b82">timer_enable_int</a>(<a class="code" href="group__avr__sfr.html#ga11643f271076024c395a93800b3d9546">_BV</a>(TOIE1));
|
|
|
|
<span class="comment">// Do some work...</span>
|
|
|
|
<span class="comment">// Disable all timer interrupts.</span>
|
|
<a class="code" href="group__deprecated__items.html#ga46f0b87ccc2ab63dea1ff28207270b82">timer_enable_int</a>(0);
|
|
</pre></div><dl class="note"><dt><b>Note:</b></dt><dd>Be careful when you use these functions. If you already have a different interrupt enabled, you could inadvertantly disable it by enabling another intterupt. </dd></dl>
|
|
<br/><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static __inline__ void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga46f0b87ccc2ab63dea1ff28207270b82">timer_enable_int</a> (unsigned char ints)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga9a3fe82a7199e9e84f7be6a5f23127bc">enable_external_int</a>(mask) (__EICR = mask)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#gaa0b2d3a87492967c01615f32f30d06d5">INTERRUPT</a>(signame)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga65483663c17f94d50d9e24e277bd7bbb"></a><!-- doxytag: member="deprecated_items::__INTR_ATTRS" ref="ga65483663c17f94d50d9e24e277bd7bbb" args="" -->
|
|
#define </td><td class="memItemRight" valign="bottom"><b>__INTR_ATTRS</b> used</td></tr>
|
|
<tr><td colspan="2"><h2>Obsolete IO macros</h2></td></tr>
|
|
<tr><td colspan="2"><p><a class="anchor" id="amgrpaf1202294281a87ab5300af3ed2225e0"></a> Back in a time when AVR-GCC and avr-libc could not handle IO port access in the direct assignment form as they are handled now, all IO port access had to be done through specific macros that eventually resulted in inline assembly instructions performing the desired action.</p>
|
|
<p>These macros became obsolete, as reading and writing IO ports can be done by simply using the IO port name in an expression, and all bit manipulation (including those on IO ports) can be done using generic C bit manipulation operators.</p>
|
|
<p>The macros in this group simulate the historical behaviour. While they are supposed to be applied to IO ports, the emulation actually uses standard C methods, so they could be applied to arbitrary memory locations as well. </p>
|
|
<br/><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga5cfa4750a0633c34c7a361d8fd62c042">inp</a>(port) (port)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#gaab324bd721e821e275f00c3478e240c9">outp</a>(val, port) (port) = (val)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#gad6488a48837d179b1833e2f48dac9665">inb</a>(port) (port)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga3a3b4c1ddf0c05701f933d70de330f08">outb</a>(port, val) (port) = (val)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga014ef751e83f97569c06f3cdd888f3f7">sbi</a>(port, bit) (port) |= (1 << (bit))</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deprecated__items.html#ga08ee265dc07048dbb5a8b6c84551d520">cbi</a>(port, bit) (port) &= ~(1 << (bit))</td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>This header file contains several items that used to be available in previous versions of this library, but have eventually been deprecated over time.</p>
|
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <compat/deprecated.h></span>
|
|
</pre></div><p>These items are supplied within that header file for backward compatibility reasons only, so old source code that has been written for previous library versions could easily be maintained until its end-of-life. Use of any of these items in new code is strongly discouraged. </p>
|
|
<hr/><h2>Define Documentation</h2>
|
|
<a class="anchor" id="ga08ee265dc07048dbb5a8b6c84551d520"></a><!-- doxytag: member="deprecated.h::cbi" ref="ga08ee265dc07048dbb5a8b6c84551d520" args="(port, bit)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define cbi</td>
|
|
<td>(</td>
|
|
<td class="paramtype">port, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bit </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port) &= ~(1 << (bit))</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000011">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Clear <code>bit</code> in IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga9a3fe82a7199e9e84f7be6a5f23127bc"></a><!-- doxytag: member="deprecated.h::enable_external_int" ref="ga9a3fe82a7199e9e84f7be6a5f23127bc" args="(mask)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define enable_external_int</td>
|
|
<td>(</td>
|
|
<td class="paramtype">mask </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (__EICR = mask)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>This macro gives access to the <code>GIMSK</code> register (or <code>EIMSK</code> register if using an AVR Mega device or <code>GICR</code> register for others). Although this macro is essentially the same as assigning to the register, it does adapt slightly to the type of device being used. This macro is unavailable if none of the registers listed above are defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gad6488a48837d179b1833e2f48dac9665"></a><!-- doxytag: member="deprecated.h::inb" ref="gad6488a48837d179b1833e2f48dac9665" args="(port)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define inb</td>
|
|
<td>(</td>
|
|
<td class="paramtype">port </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000008">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Read a value from an IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga5cfa4750a0633c34c7a361d8fd62c042"></a><!-- doxytag: member="deprecated.h::inp" ref="ga5cfa4750a0633c34c7a361d8fd62c042" args="(port)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define inp</td>
|
|
<td>(</td>
|
|
<td class="paramtype">port </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Read a value from an IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaa0b2d3a87492967c01615f32f30d06d5"></a><!-- doxytag: member="deprecated.h::INTERRUPT" ref="gaa0b2d3a87492967c01615f32f30d06d5" args="(signame)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define INTERRUPT</td>
|
|
<td>(</td>
|
|
<td class="paramtype">signame </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordtype">void</span> signame (<span class="keywordtype">void</span>) <a class="code" href="group__avr__watchdog.html#gadaa6dd28b5d08df35e49b1248d7e5fb0">__attribute__</a> ((interrupt,__INTR_ATTRS)); \
|
|
<span class="keywordtype">void</span> signame (<span class="keywordtype">void</span>)
|
|
</pre></div><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Introduces an interrupt handler function that runs with global interrupts initially enabled. This allows interrupt handlers to be interrupted.</p>
|
|
<p>As this macro has been used by too many unsuspecting people in the past, it has been deprecated, and will be removed in a future version of the library. Users who want to legitimately re-enable interrupts in their interrupt handlers as quickly as possible are encouraged to explicitly declare their handlers as described <a class="el" href="group__avr__interrupts.html#attr_interrupt">above</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga3a3b4c1ddf0c05701f933d70de330f08"></a><!-- doxytag: member="deprecated.h::outb" ref="ga3a3b4c1ddf0c05701f933d70de330f08" args="(port, val)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define outb</td>
|
|
<td>(</td>
|
|
<td class="paramtype">port, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">val </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port) = (val)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Write <code>val</code> to IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaab324bd721e821e275f00c3478e240c9"></a><!-- doxytag: member="deprecated.h::outp" ref="gaab324bd721e821e275f00c3478e240c9" args="(val, port)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define outp</td>
|
|
<td>(</td>
|
|
<td class="paramtype">val, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">port </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port) = (val)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Write <code>val</code> to IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga014ef751e83f97569c06f3cdd888f3f7"></a><!-- doxytag: member="deprecated.h::sbi" ref="ga014ef751e83f97569c06f3cdd888f3f7" args="(port, bit)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define sbi</td>
|
|
<td>(</td>
|
|
<td class="paramtype">port, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bit </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> (port) |= (1 << (bit))</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000010">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>Set <code>bit</code> in IO port <code>port</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Function Documentation</h2>
|
|
<a class="anchor" id="ga46f0b87ccc2ab63dea1ff28207270b82"></a><!-- doxytag: member="deprecated.h::timer_enable_int" ref="ga46f0b87ccc2ab63dea1ff28207270b82" args="(unsigned char ints)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static __inline__ void timer_enable_int </td>
|
|
<td>(</td>
|
|
<td class="paramtype">unsigned char </td>
|
|
<td class="paramname"> <em>ints</em></td>
|
|
<td> ) </td>
|
|
<td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd></dd></dl>
|
|
<p>This function modifies the <code>timsk</code> register. The value you pass via <code>ints</code> is device specific. </p>
|
|
|
|
</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>
|