野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 13997|回复: 2

求教关于__IO的使用情景

[复制链接]
发表于 2014-11-1 10:08:36 | 显示全部楼层 |阅读模式
这个类型说明符在火哥库里经常见到,好多函数参数都有这个,但是不知道哪些场合要加这个。
回复

使用道具 举报

发表于 2014-11-1 11:19:17 | 显示全部楼层
/* IO definitions (access restrictions to peripheral registers) */
#ifdef __cplusplus
  #define   __I     volatile             /*!< defines 'read only' permissions                 */
#else
  #define   __I     volatile const       /*!< defines 'read only' permissions                 */
#endif
#define     __O     volatile             /*!< defines 'write only' permissions                */
#define     __IO    volatile             /*!< defines 'read / write' permissions              */
回复 支持 反对

使用道具 举报

发表于 2014-11-1 18:32:56 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-9-21 08:14 , Processed in 0.040533 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表