📄 tinyx61__macros_8h.html
字号:
<p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ <a class="code" href="stdint_8h.html#a56">uint8_t</a> iFlagTemp; \ iFlagTemp = <a class="code" href="TinyX61__macros_8h.html#a1">SAVE_INTERRUPT</a>(); \ <a class="code" href="TinyX61__macros_8h.html#a3">DISABLE_INTERRUPT</a>(); \ TCNT0H = (<a class="code" href="stdint_8h.html#a56">uint8_t</a>)((value) >> 8); \ TCNT0L = (<a class="code" href="stdint_8h.html#a56">uint8_t</a>)(value); \ <a class="code" href="TinyX61__macros_8h.html#a2">RESTORE_INTERRUPT</a>(iFlagTemp); \ }</pre></div>Atomic 16 bit write to TCNT0. <p>Writes a 16 bit value to TCNT0 (TCNT0L/H) in one atomic operation.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>New 16 bit TCNT0 value.</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00108">108</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>. </td> </tr></table><a class="anchor" name="a13"></a><!-- doxytag: member="TinyX61_macros.h::TC1_READ_10_BIT_REGISTER" ref="a13" args="(sourceRegister, destinationVariable)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TC1_READ_10_BIT_REGISTER </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">sourceRegister, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>destinationVariable </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ <a class="code" href="stdint_8h.html#a56">uint8_t</a> tempL; \ tempL = (sourceRegister); \ (destinationVariable) = ( ((<a class="code" href="stdint_8h.html#a58">uint16_t</a>)TC1H << 8) | tempL); \ }</pre></div>Read 10 bit value from a Timer/Counter1 register. <p>Reads a 10 bit value from any 10 bit Timer/counter1 register.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sourceRegister</em> </td><td>Source register </td></tr> <tr><td valign="top"></td><td valign="top"><em>destinationVariable</em> </td><td>Destination variable.</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00218">218</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>. </td> </tr></table><a class="anchor" name="a15"></a><!-- doxytag: member="TinyX61_macros.h::TC1_READ_10_BIT_REGISTER_INT_SAFE" ref="a15" args="(sourceRegister, destinationVariable)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TC1_READ_10_BIT_REGISTER_INT_SAFE </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">sourceRegister, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>destinationVariable </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ <a class="code" href="stdint_8h.html#a56">uint8_t</a> iFlagTemp; \ <a class="code" href="stdint_8h.html#a56">uint8_t</a> tempL; \ iFlagTemp = <a class="code" href="TinyX61__macros_8h.html#a1">SAVE_INTERRUPT</a>(); \ tempL = (sourceRegister); \ (destinationVariable) = ( ((<a class="code" href="stdint_8h.html#a58">uint16_t</a>)TC1H << 8) | tempL); \ <a class="code" href="TinyX61__macros_8h.html#a2">RESTORE_INTERRUPT</a>(iFlagTemp); \ }</pre></div>Atomic 10 bit read from a Timer/Counter1 register. <p>Reads a 10 bit value from any 10 bit Timer/counter1 register in one atomic operation.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sourceRegister</em> </td><td>Source register </td></tr> <tr><td valign="top"></td><td valign="top"><em>destinationVariable</em> </td><td>Destination variable</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00253">253</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>. </td> </tr></table><a class="anchor" name="a16"></a><!-- doxytag: member="TinyX61_macros.h::TC1_SET_ALL_COMPARE_VALUES" ref="a16" args="(compareValue)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TC1_SET_ALL_COMPARE_VALUES </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">compareValue </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ <a class="code" href="stdint_8h.html#a58">uint16_t</a> tempValue = compareValue; \ TC1H = ((<a class="code" href="stdint_8h.html#a56">uint8_t</a>)((tempValue) >> 8)); \ OCR1A = ((<a class="code" href="stdint_8h.html#a56">uint8_t</a>)tempValue); \ OCR1B = ((<a class="code" href="stdint_8h.html#a56">uint8_t</a>)tempValue); \ OCR1D = ((<a class="code" href="stdint_8h.html#a56">uint8_t</a>)tempValue); \ }</pre></div>Set same output compare value for all output channels of Timer/counter1. <p>This macro sets the same output compare value to all three output channels of Timer/counter1. This does not apply to PWM6 mode, where all channels controlled by a single compare register.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>compareValue</em> </td><td>New output compare value.</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00272">272</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00385">TimerSetModeBrake()</a>, and <a class="el" href="main_8c-source.html#l00317">TimerSetModeSinusoidal()</a>. </td> </tr></table><a class="anchor" name="a12"></a><!-- doxytag: member="TinyX61_macros.h::TC1_WRITE_10_BIT_REGISTER" ref="a12" args="(destinationRegister, value)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TC1_WRITE_10_BIT_REGISTER </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">destinationRegister, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>value </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ TC1H = ((value) >> 8); \ (destinationRegister) = (<a class="code" href="stdint_8h.html#a56">uint8_t</a>)(value); \ }</pre></div>Write 10 bit value to a Timer/Counter1 register. <p>Writes a 10 bit value to any 10 bit Timer/Counter1 register.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>destinationRegister</em> </td><td>Destination register. </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Register value.</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00204">204</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>.<p>Referenced by <a class="el" href="main_8c-source.html#l00218">PWMInit()</a>, and <a class="el" href="main_8c-source.html#l00750">SineOutputUpdate()</a>. </td> </tr></table><a class="anchor" name="a14"></a><!-- doxytag: member="TinyX61_macros.h::TC1_WRITE_10_BIT_REGISTER_INT_SAFE" ref="a14" args="(destinationRegister, value)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define TC1_WRITE_10_BIT_REGISTER_INT_SAFE </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">destinationRegister, <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>value </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><b>Value:</b><div class="fragment"><pre class="fragment">{ \ <a class="code" href="stdint_8h.html#a56">uint8_t</a> iFlagTemp; \ iFlagTemp = <a class="code" href="TinyX61__macros_8h.html#a1">SAVE_INTERRUPT</a>(); \ <a class="code" href="TinyX61__macros_8h.html#a3">DISABLE_INTERRUPT</a>(); \ TC1H = ((value) >> 8); \ (destinationRegister) = (<a class="code" href="stdint_8h.html#a56">uint8_t</a>)(value); \ <a class="code" href="TinyX61__macros_8h.html#a2">RESTORE_INTERRUPT</a>(iFlagTemp); \ }</pre></div>Atomic 10 bit write to a Timer/Counter1 register. <p>Writes a 10 bit value to any 10 bit Timer/Counter1 register in one atomic. operation.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>destinationRegister</em> </td><td>Destination register. </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Register value.</td></tr> </table></dl><p>Definition at line <a class="el" href="TinyX61__macros_8h-source.html#l00234">234</a> of file <a class="el" href="TinyX61__macros_8h-source.html">TinyX61_macros.h</a>. </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon May 29 10:58:59 2006 for AVR449 by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -