#define P_SystemClock (volatile unsigned int *)0x7013

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/06 04:20:38
#defineP_SystemClock(volatileunsignedint*)0x7013#defineP_SystemClock(volatileunsignedint*)0x7013#def

#define P_SystemClock (volatile unsigned int *)0x7013
#define P_SystemClock (volatile unsigned int *)0x7013

#define P_SystemClock (volatile unsigned int *)0x7013
看芯片手册啊.说明systemclock这个寄存器的地址在0x7013.
对0x7013地址的寄存器赋值,总不可能写成这样吧.0x7013 = 0;
所以要做强制类型转换.
不过你给出的那个是个指针.
一般寄存器定义成这样 #define SystemClock ( * (volatile unsigned int *)0x7013 )
以后对寄存器赋值就可以这样写了 SystemClock = 0;