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

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

?? chapter 11 preprocessor directives -- valvano.htm

?? 嵌入式系統中c的開發
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
*/<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=j+1;<BR>#ifdef 
Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC&amp;=~0x01; /* PC0 cleared when Sub is 
exited */<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;return(i);}<BR>void Program(){ 
int i;<BR>#ifdef Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC|=0x02; /* PC1 set when 
Program is entered 
*/<BR>#endif<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=Sub(5);<BR>&nbsp;&nbsp;&nbsp;&nbsp;while(1) 
{ PORTC=2; i=Sub(i);}}<BR>void ProgB(){ int 
i;<BR>&nbsp;&nbsp;&nbsp;&nbsp;i=6;<BR>#ifdef 
Debug<BR>&nbsp;&nbsp;&nbsp;&nbsp;PORTC&amp;=~0x02; /* PC1 cleared when Sub is 
exited */<BR>#endif<BR>}</CODE><FONT 
face="Times New Roman,Times"><BR></FONT></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.3: Conditional 
compilation can help in removing all debugging code</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">For more information about debugging see 
Chapter 2 of Valvano's </FONT><U>Embedded Microcomputer Systems: Real Time 
Interfacing.</U></P>
<P>&nbsp;</P>
<P><B><FONT face="Times New Roman,Times"><A name=INCLUDE></A></FONT><I><FONT 
face=Helvetica,Arial>Including Other Source Files</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">The preprocessor also recognizes 
directives to include source code from other files. The two 
directives</FONT></P>
<DIR>
<DIR>
<P><CODE>#include "Filename"</CODE></P>
<P><CODE>#include &lt;Filename&gt;</CODE></P></DIR></DIR>
<P><FONT face="Times New Roman,Times">cause a designated file to be read as 
input to the compiler. The difference between these two directives is where the 
compiler looks for the file. The &lt;filename&gt; version will search for the 
file in the standard include directory, while the "filename" version will search 
for the file in the same directory as the original source file. The preprocessor 
replaces these directives with the contents of the designated files. When the 
files are exhausted, normal processing resumes. </FONT></P>
<P><FONT face="Times New Roman,Times">Filename follows the normal MS-DOS file 
specification format, including drive, path, filename, and extension. 
</FONT></P>
<P><FONT face="Times New Roman,Times">In </FONT><A 
href="http://www.ece.utexas.edu/~valvano/embed/chap10/chap10.htm#PRIVATE">Chapter 
10</A><FONT face="Times New Roman,Times">, an example using #include was 
presented that implemented a feature similar to encapsulated objects of C++, 
including private and public functions.</FONT></P>
<P>&nbsp;</P>
<P><FONT face="Times New Roman,Times"><B><A 
name=PRAGMA></A></B></FONT><B><I><FONT face=Helvetica,Arial>Interrupt 
software</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">The ICC11/ICC12 preprocessor also 
recognizes three pragma directives that we will use to develop interrupt 
software. We use the </FONT><CODE>interrupt_handler</CODE><FONT 
face="Times New Roman,Times"> pragma to specify a function as an interrupt 
handler. The compiler will then use the rti instruction rather than the rts 
instruction to return from </FONT><CODE>ExtHan</CODE><FONT 
face="Times New Roman,Times">.</FONT></P>
<P><CODE>#pragma interrupt_handler ExtHan()<BR>void ExtHan(void){ 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;KWIFJ=0x80; // clear 
flag<BR>&nbsp;&nbsp;&nbsp;&nbsp;PutFifo(PORTJ&amp;0x7F);}<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.4: Interrupt service 
routines are specified using a pragma in ICC11/ICC12.</FONT></ADDRESS>
<ADDRESS>&nbsp;</ADDRESS>
<P><FONT face="Times New Roman,Times">We use the 
</FONT><CODE>abs_address</CODE><FONT face="Times New Roman,Times"> and 
</FONT><CODE>end_abs_address</CODE><FONT face="Times New Roman,Times"> pragmas 
to define the interrupt vector.</FONT></P>
<P><CODE>#pragma abs_address:0xffdo<BR>void (*KeyWakupJ_interrupt_vector[])() = 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;ExtHan}; /* 812 KeyWakeUpJ */<BR><BR>#pragma 
end_abs_address</CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.5: Pragmas allow us to 
define interrupt vectors in ICC11/ICC12.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">We also set the reset vector using the 
</FONT><CODE>abs_address</CODE><FONT face="Times New Roman,Times"> and 
</FONT><CODE>end_abs_address</CODE><FONT face="Times New Roman,Times"> 
pragmas.</FONT></P>
<P><CODE>extern void _start(); /* entry point in crt12.s */<BR>#pragma 
abs_address:0xfffe<BR>void (*Reset_interrupt_vectors[])() = 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;_start }; /* fffe RESET, entry point into ICC12 
*/<BR>#pragma end_abs_address<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.6: Pragmas allow us to 
define the reset vector in ICC11/ICC12.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times">We will not use pragmas to develop 
interrupt software with the Hiware compiler. We use the 
</FONT><CODE>interrupt</CODE><FONT face="Times New Roman,Times"> key word to 
specify a function as an interrupt handler. The Hiware compiler will then use 
the rti instruction rather than the rts instruction to return from 
</FONT><CODE>ExtHan</CODE><FONT face="Times New Roman,Times">. We start counting 
the interrupt number from reset. Some of the interrupt numbers used by Hiware 
for the MC68HC812A4 are shown in the following table.</FONT></P>
<P>
<TABLE cellSpacing=0 width=390 border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width="17%">number</TD>
    <TD vAlign=top width="83%">source</TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">24</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      H</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">23</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      J</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">20</FONT></TD>
    <TD vAlign=top width="83%"><FONT 
    face="Times New Roman,Times">SCI0</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">16</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      overflow</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">15</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      channel 7</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">8</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">timer 
      channel 0</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">6</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">Key wakeup 
      D</FONT></TD></TR>
  <TR>
    <TD vAlign=top width="17%"><FONT face="Times New Roman,Times">4</FONT></TD>
    <TD vAlign=top width="83%"><FONT face="Times New Roman,Times">SWI software 
      interrupt</FONT></TD></TR>
  <TR>
    <TD width="17%"><FONT face="Times New Roman,Times">0</FONT></TD>
    <TD width="83%"><FONT 
  face="Times New Roman,Times">reset</FONT></TD></TR></TBODY></TABLE></P>
<P><I>Table 11-1: Interrupt numbers for the MC68HC812A4 used by Hiware</I></P>
<P><FONT face="Times New Roman,Times">Hiware will automatically set the 
interrupt vector for KeyWakeup J to point to the ExtHan routine.</FONT></P>
<P><CODE>void interrupt 23 ExtHan(void){ <BR>&nbsp;&nbsp;&nbsp;&nbsp;KWIFJ=0x80; 
// clear 
flag<BR>&nbsp;&nbsp;&nbsp;&nbsp;PutFifo(PORTJ&amp;0x7F);}<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.7: Interrupt service 
routines are specified in Hiware.</FONT></ADDRESS>
<ADDRESS>&nbsp;</ADDRESS>
<P><FONT face="Times New Roman,Times">We use the prm linker file to define the 
reset vector.</FONT></P>
<P><CODE>LINK keywake.abs<BR>NAMES keywake.o start12s.o ansis.lib 
END<BR>SECTIONS <BR>MY_RAM = READ_WRITE 0x0800 TO 0x0AFF;<BR>MY_ROM = READ_ONLY 
0xF000 TO 0xFF00;<BR>MY_STK = READ_WRITE 0x0B00 TO 
0x0BFF;<BR>PLACEMENT<BR>DEFAULT_ROM INTO MY_ROM;<BR>DEFAULT_RAM INTO 
MY_RAM;<BR>SSTACK INTO MY_STK;<BR>END<BR>/* set reset vector to function 
_Startup defined in startup code start12.c */<BR>VECTOR ADDRESS 0xFFFE 
_Startup<BR></CODE></P>
<ADDRESS><FONT face="Times New Roman,Times">Listing 11.8: The last line of the 
PRM linker file defines the reset vector in Hiware.</FONT></ADDRESS>
<P><FONT face="Times New Roman,Times"><BR>&nbsp;</FONT></P>
<P><FONT face="Times New Roman,Times">For more information about interrupts see 
Chapter 4 of Valvano's </FONT><U>Embedded Microcomputer Systems: Real Time 
Interfacing.</U></P>
<P>&nbsp;</P>
<P>Go to <A 
href="http://www.ece.utexas.edu/~valvano/embed/chap12/chap12.htm">Chapter 12 on 
Assembly Language</A> <FONT face="Times New Roman,Times">Return to <A 
href="http://www.ece.utexas.edu/~valvano/embed/toc1.htm">Table of 
Contents</A></FONT></P></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
zzijzzij亚洲日本少妇熟睡| 国产98色在线|日韩| 久久色成人在线| 欧美在线观看视频在线| 国产一区三区三区| 悠悠色在线精品| 国产色产综合色产在线视频| 欧美三级中文字幕在线观看| 成人毛片视频在线观看| 麻豆精品视频在线观看| 一区二区三区在线高清| 中文字幕av一区二区三区高| 欧美成人欧美edvon| 欧亚洲嫩模精品一区三区| 国产在线播放一区| 一区2区3区在线看| 国产精品国产三级国产专播品爱网| 欧美自拍丝袜亚洲| 色综合久久88色综合天天6| 久久精品国产网站| 国产精品午夜电影| 欧美精品一区二区三区高清aⅴ | 亚洲特级片在线| 精品三级av在线| 91极品美女在线| av网站免费线看精品| 极品少妇xxxx偷拍精品少妇| 综合激情成人伊人| 久久精品一区四区| 欧美一区二区视频观看视频| 9久草视频在线视频精品| 麻豆成人av在线| 亚洲777理论| 黑人巨大精品欧美黑白配亚洲 | 91年精品国产| 国产精品国产三级国产aⅴ入口 | 欧美日韩大陆一区二区| 日韩**一区毛片| 亚洲成av人片一区二区| 国产精品国产自产拍在线| 国产欧美日韩在线| 日韩精品一区二区三区在线| 555www色欧美视频| 欧美日韩成人高清| 欧美在线视频不卡| 欧美三级日韩三级| 欧美在线高清视频| 欧美日韩午夜在线视频| 91福利视频久久久久| 欧美精品成人一区二区三区四区| 色综合久久久网| 国产成人一级电影| 国产精品99久久久| 国产一区二区在线视频| 国产精品99久久久久久久女警 | 欧美极品xxx| 久久精品视频网| 久久久久久久性| 久久综合av免费| 精品国产乱码久久| 欧美高清视频www夜色资源网| 欧美一区二区高清| 日韩欧美久久久| 久久精品一区二区三区不卡牛牛 | 日本女优在线视频一区二区| 日本成人在线不卡视频| 久久99久久精品欧美| 美女视频免费一区| 国产一区在线看| 色噜噜久久综合| 欧美在线观看一二区| 欧美一级片在线看| 久久亚洲私人国产精品va媚药| 中文字幕亚洲成人| 亚洲精品一二三| 日韩精品91亚洲二区在线观看| 欧美a级一区二区| 久久不见久久见中文字幕免费| 成人免费的视频| 91福利在线看| 2021国产精品久久精品| 欧美国产激情一区二区三区蜜月| 一区二区三区四区在线免费观看| 亚洲国产人成综合网站| 黄页视频在线91| 成人av网在线| 欧美色图免费看| 欧美激情一区二区三区蜜桃视频| 亚洲视频图片小说| 极品销魂美女一区二区三区| 成人一级视频在线观看| 91精品国产综合久久久蜜臀粉嫩| 久久久欧美精品sm网站| 国产日韩视频一区二区三区| 一区二区三区在线视频播放| 日本亚洲三级在线| 色先锋资源久久综合| 91精品国产色综合久久不卡电影 | 狠狠狠色丁香婷婷综合激情| 成人国产亚洲欧美成人综合网| 在线观看av一区| 26uuu精品一区二区| 亚洲一区二区欧美日韩| 韩国精品主播一区二区在线观看| 欧美三级视频在线观看| 久久精品一区四区| 美女一区二区视频| 91视频在线观看| 中文字幕第一区二区| 日韩精品一级中文字幕精品视频免费观看 | 国产永久精品大片wwwapp| 色综合久久综合中文综合网| 91精品国产免费久久综合| 国产精品传媒入口麻豆| 奇米在线7777在线精品| 欧美日韩中字一区| 国产精品久久看| 成人久久久精品乱码一区二区三区| 欧美日韩免费在线视频| 亚洲欧美日韩国产手机在线| 国产精品自在在线| 日韩欧美一级二级三级| 亚洲国产精品一区二区www| 色综合天天综合狠狠| 国产女人aaa级久久久级| 亚洲午夜免费电影| 欧美视频精品在线观看| 亚洲视频在线观看三级| 97se亚洲国产综合自在线观| 久久亚洲一区二区三区四区| 韩日av一区二区| 日韩一级大片在线| 蓝色福利精品导航| 欧美日本一道本在线视频| 亚洲第一久久影院| 色诱视频网站一区| 中文一区二区在线观看| 国产一区二区毛片| 欧美美女一区二区在线观看| 亚洲国产va精品久久久不卡综合| 93久久精品日日躁夜夜躁欧美| 亚洲欧美激情一区二区| 成人免费看黄yyy456| 成人欧美一区二区三区小说| 国产精品一区二区免费不卡| 中文字幕第一区第二区| 国产麻豆精品95视频| 欧美国产成人精品| 福利电影一区二区| 国产精品国产三级国产普通话蜜臀 | 亚洲欧洲日本在线| av一区二区三区在线| 有码一区二区三区| 日本精品一区二区三区高清 | 亚洲三级久久久| 欧美色精品在线视频| 亚洲国产日韩a在线播放性色| 69堂国产成人免费视频| 婷婷六月综合网| 久久这里只有精品6| 国产一区二区0| 亚洲欧美激情小说另类| 欧美日韩国产色站一区二区三区| 亚洲色图欧洲色图| 色域天天综合网| 亚洲日本丝袜连裤袜办公室| 欧美疯狂性受xxxxx喷水图片| 亚洲成a人v欧美综合天堂下载 | 欧美一区二区三区精品| 久久精品国产亚洲一区二区三区| 国产欧美精品一区aⅴ影院| aaa欧美日韩| 亚洲男人的天堂一区二区| 欧美日韩精品综合在线| 国产高清在线精品| 最新国产の精品合集bt伙计| 欧美日本一道本在线视频| 国产一区二区在线电影| 亚洲精品成人a在线观看| 777午夜精品免费视频| 国产麻豆精品theporn| 亚洲区小说区图片区qvod| eeuss影院一区二区三区| 三级在线观看一区二区| 久久精品人人做| 欧美日韩精品一区二区三区四区 | 成人自拍视频在线| 亚洲欧美日韩电影| 日韩美一区二区三区| 国产成人免费视| 奇米精品一区二区三区四区| 国产欧美精品一区二区色综合 | 日韩精品一区第一页| 国产精品久久毛片a| 欧美久久婷婷综合色| 成人av网站在线观看免费| 亚洲国产色一区| 亚洲欧洲三级电影| 精品久久久影院| 欧美精品精品一区|