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.
102 lines
4.8 KiB
HTML
102 lines
4.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>avr-libc: power.h File Reference</title>
|
|
<link href="dox.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body>
|
|
<center>
|
|
<table width="80%">
|
|
<tr>
|
|
<td align="left"><a href="http://www.nongnu.org/avr-libc/">AVR Libc Home Page</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/">AVR Libc Development Pages</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" width="13%"><a href="index.html">Main Page</a></td>
|
|
<td align="center" width="13%"><a href="pages.html">User Manual</a></td>
|
|
<td align="center" width="13%"><a href="modules.html">Library Reference</a></td>
|
|
<td align="center" width="13%"><a href="FAQ.html">FAQ</a></td>
|
|
<td align="center" width="13%"><a href="globals.html">Alphabetical Index</a></td>
|
|
<td align="center" width="13%"><a href="group__demos.html">Example Projects</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
<hr width="80%">
|
|
<!-- Generated by Doxygen 1.5.6 -->
|
|
<div class="contents">
|
|
<h1>power.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
|
|
<p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7671addc7678720510a30518034e3ea9"></a><!-- doxytag: member="power.h::_AVR_POWER_H_" ref="7671addc7678720510a30518034e3ea9" args="" -->
|
|
#define </td><td class="memItemRight" valign="bottom"><b>_AVR_POWER_H_</b> 1</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>clock_prescale_set</b>(x)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7154fa3046d3387af8d6c5f489bf7194"></a><!-- doxytag: member="power.h::clock_prescale_get" ref="7154fa3046d3387af8d6c5f489bf7194" args="()" -->
|
|
#define </td><td class="memItemRight" valign="bottom"><b>clock_prescale_get</b>() (clock_div_t)(CLKPR & (<a class="el" href="group__avr__stdint.html#gba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((1<<CLKPS0)|(1<<CLKPS1)|(1<<CLKPS2)|(1<<CLKPS3)))</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>clock_div_t</b> { <br>
|
|
<b>clock_div_1</b> = 0,
|
|
<b>clock_div_2</b> = 1,
|
|
<b>clock_div_4</b> = 2,
|
|
<b>clock_div_8</b> = 3,
|
|
<br>
|
|
<b>clock_div_16</b> = 4,
|
|
<b>clock_div_32</b> = 5,
|
|
<b>clock_div_64</b> = 6,
|
|
<b>clock_div_128</b> = 7,
|
|
<br>
|
|
<b>clock_div_256</b> = 8
|
|
<br>
|
|
}</td></tr>
|
|
|
|
</table>
|
|
<hr><h2>Define Documentation</h2>
|
|
<a class="anchor" name="2fd1aa8f501486943d14976734a8721f"></a><!-- doxytag: member="power.h::clock_prescale_set" ref="2fd1aa8f501486943d14976734a8721f" args="(x)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define clock_prescale_set </td>
|
|
<td>(</td>
|
|
<td class="paramtype">x </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
|
|
<a class="code" href="group__avr__stdint.html#gba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tmp = <a class="code" href="group__avr__sfr.html#g11643f271076024c395a93800b3d9546">_BV</a>(CLKPCE); \
|
|
__asm__ __volatile__ ( \
|
|
<span class="stringliteral">"in __tmp_reg__,__SREG__"</span> <span class="stringliteral">"\n\t"</span> \
|
|
<span class="stringliteral">"cli"</span> <span class="stringliteral">"\n\t"</span> \
|
|
<span class="stringliteral">"sts %1, %0"</span> <span class="stringliteral">"\n\t"</span> \
|
|
<span class="stringliteral">"sts %1, %2"</span> <span class="stringliteral">"\n\t"</span> \
|
|
<span class="stringliteral">"out __SREG__, __tmp_reg__"</span> \
|
|
: <span class="comment">/* no outputs */</span> \
|
|
: <span class="stringliteral">"d"</span> (tmp), \
|
|
<span class="stringliteral">"M"</span> (_SFR_MEM_ADDR(CLKPR)), \
|
|
<span class="stringliteral">"d"</span> (x) \
|
|
: <span class="stringliteral">"r0"</span>); \
|
|
}
|
|
</pre></div>
|
|
</div>
|
|
</div><p>
|
|
</div>
|
|
|
|
<hr width="80%">
|
|
<p><center>Automatically generated by Doxygen 1.5.6 on 4 Dec 2008.</center></p>
|
|
|
|
</body>
|
|
</html>
|