关键词ioport的作用是什么
来源:互联网 发布:蜂窝数据怎么一键开启 编辑:程序博客网 时间:2024/04/28 07:01
The ioport keyword enables access to the I/O port space of the C54x devices. The keyword has the form:
ioport type port hex_num
ioport is the keyword that indicates this is a port variable.
type must be char, short, int, or the unsigned variable.
porthex_num refers to the port number. The hex_num argument is a hexadecimal number.
All declarations of port variables must be done at the file level. Port variables declared at the function level are not supported. Do not use the ioport keyword in a function prototype.
For example, the following code declares the I/O port as unsigned port 10h, writes a to port 10h, then reads port 10h into b:
ioport unsigned port10; /* variable to access I/O port 10h */
int func ()
{
...
port10 = a; /* write a to port 10h */
...
b = port10; /* read port 10h into b */
...
}
The use of port variables is not limited to assignments. Port variables can be used in expressions like any other variable. Following are examples:
a = port10 + b; /* read port 10h, add b, assign to a */
port10 += a; /* read port 10h, add a, write to port 10h */
In calls, port variables are passed by value, not by reference:
call(port10); /* read port 10h and pass (by value) to call */
call(&port10); /* invalid pass by reference! */
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/cdm_xu/archive/2009/06/13/4265563.aspx
- 关键词ioport的作用是什么
- 关键词ioport的作用是什么
- DSP C54X ioport的用法
- static 关键词的作用
- 关键词final的作用总结
- dsp 中关于ioport 的用法
- 数据库的作用是什么
- 路由器的作用是什么?
- SetCompatibleTextRenderingDefault的作用是什么?
- SetCompatibleTextRenderingDefault的作用是什么?
- JNDI的作用是什么
- SoapHeader 的作用是什么
- 委托的作用是什么
- @RequestParam的作用是什么
- g_signal_connect_swapped的作用是什么?
- VNC的作用是什么
- Evolution的作用是什么?
- dispatch_barrier_async的作用是什么?
- iterator与const_iterator
- 初次实验NET Micro Framework / .Net MF开发板固件部署
- WCF中如何修改MaxItemsInObjectGraph的限制
- 修改swap空间大小(针对WUBI安装的ubuntu)
- jsp运行环境安装
- 关键词ioport的作用是什么
- outport( WINDOWS)
- dsp 中关于ioport 的用法
- window.location 属性方法复习
- MyEclipse激活码~~
- 第一天 SQL的安装
- 最近结识了python
- 基于管道化和事件驱动模型的Web请求处理(一)
- typedef用法