亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? group__isr.html

?? yavrtos,一款用于廣泛用于AVR單片機的RTOS,文件里是這款OS的源碼
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>YAVRTOS: Interrupt Service Routines</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.4 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="modules.html"><span>Modules</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><h1>Interrupt Service Routines</h1><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">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__isr.html#g3d04938242a5060aac8a64b72c055eb0">TASK_ISR</a>(vector, do_task_switch)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The macro for ISRs.  <a href="#g3d04938242a5060aac8a64b72c055eb0"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Interrupt Service Routines are functions that are called when an interrupt occurs, and are defined with the <a class="el" href="group__isr.html#g3d04938242a5060aac8a64b72c055eb0" title="The macro for ISRs.">TASK_ISR()</a> macro. <hr><h2>Define Documentation</h2><a class="anchor" name="g3d04938242a5060aac8a64b72c055eb0"></a><!-- doxytag: member="task.h::TASK_ISR" ref="g3d04938242a5060aac8a64b72c055eb0" args="(vector, do_task_switch)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define TASK_ISR          </td>          <td>(</td>          <td class="paramtype">vector,         <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">do_task_switch&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>The macro for ISRs. <p>The arguments are <ul><li><code>vector</code> the ISR vector </li><li><code>do_task_switch</code> something that evaluates non-zero if the ISR should trigger a task switch. This could be a constant, a function call, a macro, anything. Note that the tick interrupt <b>must</b>, by definition, trigger a task switch. It is highly recommended that this macro always evaluates to non-zero - the only time where it would be safe for it to evaluate to zero is if it does absolutely nothing to any task, semaphore, mailbox or mutex (i.e. if it doesn't do anything that could un-suspend a suspended task).</li></ul>See <a class="el" href="example.html">the example application</a> and <a class="el" href="howdoi.html#how-write-isr">how do I write an ISR</a> for examples of usage.<p>The WinAVR&trade; ISR() macro can also be used to define ISRs - however, when using ISR() as opposed to <a class="el" href="group__isr.html#g3d04938242a5060aac8a64b72c055eb0" title="The macro for ISRs.">TASK_ISR()</a>, you cannot make use of any YAVRTOS API call from within your ISR, and your ISR will not (necessarily) be using the system stack.<p>Taking this macro apart line-by-line, we have<p><div class="fragment"><pre class="fragment"> <span class="comment">// The standard way of calling an ISR</span> <span class="keywordtype">void</span> vector(<span class="keywordtype">void</span>) __attribute__ ((signal,naked,__INTR_ATTRS)); <span class="comment">// The ISR itself</span> <span class="keywordtype">void</span> vector(<span class="keywordtype">void</span>) {        <span class="comment">// Save the entire CPU context to the stack (which could be a task stack or the system stack)</span>        <a class="code" href="task_8h.html#bedcaab91615f58a55ed4135438618e8" title="Save the CPU context to the stack, and disable interrupts">save_cpu_context</a>();        <span class="comment">// Global interrupts were enabled just before this ISR was launched (otherwise it would not have</span>        <span class="comment">// launched), and are disabled upon entry into the ISR. Set the interrupt enable bit at the location of</span>        <span class="comment">// the saved status register on the saved stack so that when we restore the CPU context, interrupts will</span>        <span class="comment">// be re-enabled.</span>        *(((uint8_t*)SP)+1) |= _BV(SREG_I);        <span class="comment">// Now, we have either interrupted a task or interrupted another ISR. system.interrupted_task will</span>        <span class="comment">// be non-zero if a task has already been interrupted - i.e. if we have interrupted an ISR</span>        <span class="comment">// Note that task_switch() also sets system.interrupted_task - any ISRs that manage to run during</span>        <span class="comment">// the brief period when task_switch() enables interrupts should not subsequently run task_switch()!</span>        <span class="keywordflow">if</span> (<a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a>) { <span class="comment">// We have interrupted an ISR (or we have interrupted task_switch())</span>                <span class="comment">// Execute the macro to see if we should do a task switch</span>                <span class="keywordflow">if</span> (do_task_switch) {                        <span class="comment">// The macro may have enabled interrupts - disable them again</span>                        cli();                        <span class="comment">// Set bit 1 of system.interrupted_task - the bit that signals that a task switch is</span>                        <span class="comment">// required. We don't do the task switch just yet, as we have interrupted another ISR,</span>                        <span class="comment">// so we need to return to that ISR first. The ISR that interrupted the task will be the one</span>                        <span class="comment">// to actually perform the task switch (see below)</span>                        <span class="comment">// If we have actually interrupted task_switch(), then setting bit 1 of system.interrupted_task</span>                        <span class="comment">// will have no effect - but we were doing a task switch anyway!</span>                        <a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a> = 3;                } <span class="keywordflow">else</span> {                        <span class="comment">// Task switch not required (this time). Make sure that interrupts are still disabled</span>                        cli();                }        } <span class="keywordflow">else</span> { <span class="comment">// We have interrupted a task</span>                <span class="comment">// Save the stack pointer</span>                <a class="code" href="group__task.html#g4743b3673a8794b8e7bd0b6c91a63cd5" title="The current task.">current_task</a>-&gt;<a class="code" href="structtask__t.html#61dcd38718f0b8754f93c77644e9bce0" title="The stack pointer as at the last time this task was suspended">sp</a> = (uint8_t *)SP;                <span class="comment">// Switch to the system stack</span>                SP = (uint16_t) <a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#ee9b90c55094ba09ac8705e8084ce9b9" title="The top of the system stack.">stack_top</a>;                <span class="comment">// Set the system.interrupted_task so that subsequent ISRs will know that they have interrupted</span>                <span class="comment">// an ISR, not a task. This has the side-effect of disabling switch_task() - all API calls check</span>                <span class="comment">// system.interrupted_task and do NOT perform a task switch if it is non-zero.</span>                <a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a> = 1;                <span class="comment">// Execute the macro and see if we should do a task switch</span>                if (do_task_switch) {                        <span class="comment">// The macro could have enabled interrupts - disable them</span>                        cli();                        <span class="comment">// Signal to ourselves that we need a task switch - bit 1 of system.interrupted_task is set</span>                        <span class="comment">// when a task switch is required</span>                        <a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a> = 3;                } <span class="keywordflow">else</span> {                        <span class="comment">// Make sure that interrupts are disabled</span>                        cli();                }                <span class="comment">// At this point, any ISRs that interrupted us have finished.</span>                <span class="comment">// Now, if a task switch is required, perform it!</span>                <span class="keywordflow">if</span> (<a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a> &amp; 2) {                        <span class="comment">// switch_task() will (eventually) reset system.interrupted_task, and never "returns"</span>                        <a class="code" href="task_8c.html#aa4ee75536398ba2bd21466b13bdcd57" title="Perform a task switch">switch_task</a>();                }                <span class="comment">// A task switch is not required - restore the stack pointer so that we return to the task</span>                SP = (uint16_t) <a class="code" href="group__task.html#g4743b3673a8794b8e7bd0b6c91a63cd5" title="The current task.">current_task</a>-&gt;<a class="code" href="structtask__t.html#61dcd38718f0b8754f93c77644e9bce0" title="The stack pointer as at the last time this task was suspended">sp</a>;                <span class="comment">// We are about to return to the task - reset system.interrupted_task</span>                <a class="code" href="task_8c.html#8e20fafa56301aad5b476cbd2c9e5b48" title="The system stack, and a flag indicating whether the CPU is currently processing an...">system</a>.<a class="code" href="structsystem__struct.html#0ffafae88663b0d12161b161d2b87ea1" title="non-zero if we are executing an ISR. Also, bit 1 is set if a task switch is required...">interrupted_task</a> = 0;        }        <span class="comment">// Return to whatever we were doing before this ISR was called</span>        <a class="code" href="task_8h.html#7e11bac5a51572c5db72502c47cf90d3" title="Restore the CPU context from the stack, possibly re-enabling interrupts">restore_cpu_context</a>();        __asm__ <span class="keyword">volatile</span> (<span class="stringliteral">"ret"</span> ::); }</pre></div> </div></div><p><hr><p align="center"><font size="-1">YAVRTOS and YAVRTOS documentation Copyright &copy; 2007-2008 Chris O'Byrne. Email - chris &lt;at&gt; obyrne &lt;dot&gt; com</font></p></body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利视频一区二区三区| 在线综合亚洲欧美在线视频| 色天使久久综合网天天| 欧美sm极限捆绑bd| 亚洲综合一区二区精品导航| 精东粉嫩av免费一区二区三区| 日本久久一区二区| 欧美国产成人精品| 久久91精品久久久久久秒播| 在线精品视频免费观看| 国产女主播一区| 国产在线视视频有精品| 欧美久久久久久久久中文字幕| 中文字幕在线观看一区二区| 韩国一区二区在线观看| 欧美精品三级在线观看| 亚洲欧洲综合另类在线| 成人精品高清在线| 欧美tk丨vk视频| 日本欧美一区二区在线观看| 欧美日韩久久不卡| 亚洲线精品一区二区三区| 91在线视频播放地址| 夜夜夜精品看看| 成人黄动漫网站免费app| 久久久国产精华| 国产精品一二三四区| 欧美sm极限捆绑bd| 韩国欧美一区二区| 日韩女优电影在线观看| 美日韩一区二区| 欧美大胆一级视频| 国模无码大尺度一区二区三区| 日韩视频免费观看高清完整版在线观看 | 秋霞国产午夜精品免费视频| 欧美日韩国产精品自在自线| 亚洲一区二区在线免费看| 色香蕉久久蜜桃| 一级中文字幕一区二区| 色婷婷久久久久swag精品| 亚洲在线视频网站| 欧美日韩一区在线观看| 日韩国产成人精品| 精品粉嫩aⅴ一区二区三区四区| 免费在线看一区| 久久久99久久| 白白色 亚洲乱淫| 亚洲与欧洲av电影| 欧美精品日日鲁夜夜添| 九九九久久久精品| 欧美激情一区二区三区在线| 99久久精品国产毛片| 亚洲在线成人精品| 日韩欧美一区二区视频| 国产精品一品视频| 日韩毛片在线免费观看| 欧美日韩国产首页| 韩国v欧美v亚洲v日本v| 国产精品第13页| 欧美日韩久久不卡| 国产激情一区二区三区桃花岛亚洲| 国产亚洲欧美中文| 日本精品裸体写真集在线观看| 日韩成人精品在线观看| 中文字幕 久热精品 视频在线| 色婷婷国产精品久久包臀| 青青草视频一区| 国产香蕉久久精品综合网| 色播五月激情综合网| 免费欧美在线视频| 中文字幕一区二区视频| 亚洲一区自拍偷拍| 久久婷婷成人综合色| 97精品国产露脸对白| 日韩高清欧美激情| 亚洲日本va午夜在线电影| 日韩一区二区在线观看视频| 波多野结衣中文一区| 日韩精品五月天| 亚洲毛片av在线| 久久亚洲综合av| 欧美日韩大陆在线| av男人天堂一区| 国产在线精品一区二区三区不卡| 一区二区三区在线看| 国产精品―色哟哟| 精品乱人伦一区二区三区| 色婷婷综合中文久久一本| 韩国精品久久久| 日韩电影在线免费观看| 亚洲精品国产第一综合99久久| 26uuu精品一区二区三区四区在线| 精品视频一区二区三区免费| 91啪在线观看| 国产69精品久久久久毛片| 蜜臀a∨国产成人精品| 香蕉成人伊视频在线观看| 亚洲人被黑人高潮完整版| 国产精品丝袜91| 欧美韩日一区二区三区| 久久女同性恋中文字幕| 日韩欧美在线不卡| 欧美精品日日鲁夜夜添| 欧美久久一区二区| 欧美日韩一区三区| 日本韩国视频一区二区| 欧美成人一区二区三区| 欧美日韩一区高清| 欧美三区在线观看| 欧美日韩亚洲综合| 欧美久久久久免费| 91麻豆精品国产91久久久资源速度 | 国产一区二区在线视频| 日韩精品一二三区| 亚洲大片在线观看| 亚洲成人免费视| 亚洲成人av电影在线| 婷婷丁香激情综合| 日产国产高清一区二区三区| 日韩不卡一二三区| 久久国产成人午夜av影院| 久久av资源网| 韩国三级在线一区| www.亚洲人| 91久久人澡人人添人人爽欧美| 色综合久久久久久久久久久| 在线观看国产一区二区| 欧美精品三级日韩久久| 欧美成人一级视频| 国产日韩欧美综合一区| 国产精品九色蝌蚪自拍| 亚洲午夜在线电影| 日韩中文字幕av电影| 久久99国产精品久久| 高清国产午夜精品久久久久久| 北条麻妃一区二区三区| 91福利在线免费观看| 欧美日韩精品欧美日韩精品| 欧美白人最猛性xxxxx69交| 国产欧美日韩视频一区二区 | 午夜a成v人精品| 精品一二线国产| 91在线播放网址| 91精品国产福利| 日本一区二区不卡视频| 亚洲v日本v欧美v久久精品| 九色porny丨国产精品| 99在线视频精品| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲国产精品传媒在线观看| 亚洲欧美偷拍另类a∨色屁股| 亚洲成人黄色小说| 国产精品一级在线| 欧美日韩一区二区三区在线| 国产午夜精品美女毛片视频| 亚洲一区二区三区不卡国产欧美| 精品一区二区三区av| 色欧美片视频在线观看在线视频| 欧美一二三在线| 国产精品成人在线观看| 蜜桃av一区二区三区电影| 成人91在线观看| 欧美变态口味重另类| 亚洲制服欧美中文字幕中文字幕| 国产在线不卡一卡二卡三卡四卡| 欧美亚洲国产怡红院影院| 久久综合一区二区| 午夜日韩在线观看| 91一区二区在线| 亚洲精品一区二区三区影院| 午夜精品久久久久久久99樱桃| 欧美一级生活片| 亚洲影视资源网| 成人国产精品免费观看| 欧美大片在线观看一区| 亚洲高清免费观看高清完整版在线观看| 国产一区美女在线| 日韩午夜在线影院| 一区二区三区中文字幕精品精品 | 欧美极品少妇xxxxⅹ高跟鞋| 日韩综合小视频| 在线观看日韩av先锋影音电影院| 久久在线免费观看| 久久成人18免费观看| 欧美电影一区二区三区| 亚洲精品国产一区二区精华液 | 国产亚洲欧洲997久久综合 | 欧美在线不卡视频| 中文字幕日本乱码精品影院| 国产乱子轮精品视频| 日韩午夜精品电影| 亚洲一区二区三区爽爽爽爽爽| 99在线视频精品| 亚洲三级免费电影| jvid福利写真一区二区三区| 日本一区二区三区电影| 处破女av一区二区| 国产精品欧美极品| 色综合天天在线| 一区二区三区在线视频观看 |