#define GPBCON (*(volatile unsigned *)0x56000010) 的理解:
来源:互联网 发布:淘宝客设置推广位 编辑:程序博客网 时间:2024/06/08 08:10
对于不同的计算机体系结构,设备可能是端口映射,也可能是内存映射的。如果系统结构支持独立的IO地址空间,并且是端口映射,就必须使用汇编语言完成实际对设备的控制,因为C语言并没有提供真正的“端口”的概念。如果是内存映射,那就方便的多了。
1. volatile变量可变 允许除了程序之外的比如硬件来修改他的内容
2. 访问该数据任何时候都会直接访问该地址处内容,即通过cache提高访问速度的优化被取消
对于(volatile unsigned char *)0x20我们再分析一下,它是由两部分组成:
那么(volatile unsigned char *)0x20是一个固定的指针,是不可变的,不是变量。而char
那么你的问题就可解答了,(*(volatile unsigned char *)0x20)可看作是一个普通变量,这个变量有固定的地址,指向0x20。而0x20只是个常量,不是指针更不是变量。
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解:
- 对#define GPBCON (*(volatile unsigned long*)0x56000010)的理解
- (*(volatile unsigned *)0x56000010)解释。
- (*(volatile unsigned char *)0x56000010)
- ARM寄存器地址定义——#define rGPBCON (*(volatile unsigned *)0x56000010)
- 关于#define rGPACON(*(volatile unsigned long *)0x56000000)的理解
- 理解#define SREG (*(volatile unsigned char *)0x5F)
- 如何理解 #define SREG (*(volatile unsigned char *)0x5F
- 理解#define SREG (*(volatile unsigned char *)0x5F
- 理解#define SREG (*(volatile unsigned char *)0x5F)
- 理解#define SREG (*(volatile unsigned char *)0x5F)
- *(volatile unsigned *)0x4F000000 的理解
- (*(volatile unsigned long *)0x0012450的理解
- #define rUTXH0 (*(volatile unsigned char *)0x1d00020)
- 使用androidstudio自带的git插件进行版本控制图文详解
- 8.1 Triple Stair
- 8.2 Robot in a Grid
- #ifdef __cplusplus extern "C" { #endif 的解释
- ubuntu关机重启命令介绍
- #define GPBCON (*(volatile unsigned *)0x56000010) 的理解:
- 题解
- BZOJ 3124 [Sdoi2013]直径 DFS
- 4.4.6 切换全屏模式
- adb使用大全
- 信息安全推荐书籍
- Android library projects cannot be launched解决方案
- ubuntu的init与系统服务设置
- 开关电源[2] 变压器制作注意问题