关键词ioport的作用是什么
来源:互联网 发布:东软睿道软件 编辑:程序博客网 时间:2024/04/29 02:13
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! */
- 关键词ioport的作用是什么
- 关键词ioport的作用是什么
- DSP C54X ioport的用法
- static 关键词的作用
- 关键词final的作用总结
- dsp 中关于ioport 的用法
- 数据库的作用是什么
- 路由器的作用是什么?
- SetCompatibleTextRenderingDefault的作用是什么?
- SetCompatibleTextRenderingDefault的作用是什么?
- JNDI的作用是什么
- SoapHeader 的作用是什么
- 委托的作用是什么
- @RequestParam的作用是什么
- g_signal_connect_swapped的作用是什么?
- VNC的作用是什么
- Evolution的作用是什么?
- dispatch_barrier_async的作用是什么?
- 提升JSP应用程序的七大绝招
- uClinux 启动过程详细分析
- vi 编辑器命令简要
- VS2008 + OGRE1.6.2 + ETM 2.3.1的具体配置
- 多条件组合查询,并根据指定类别找出所有最小子类别的SQL语句备忘
- 关键词ioport的作用是什么
- 开发人员有用的网站
- 设为首页和收藏本站的实现
- 动态生成静态页面的几种方法
- 该网可以促进很多专业人士进行沟通
- 用js实现文件无刷新上传
- 致刚入门的程序员五点建议
- VC无负担实现XP风格界面
- JAVA反射机制