编程方式两种,一种是寄存器编程,一种是函数库编程
什么是寄存器
stm32芯片=ARM内核生产Cortex内核+st公司(在内核基础上)开发stm32
寄存器是用来地址操作的
寄存器编程
int main()
{
volatile unsigned int *pointer=(unsigned int *)0x400280000;
*pointer=1;
}
unsigned int *将立即数转为地址
0x400280000以太网地址
用宏定义的方式
#define pointer (volatile unsigned int *)0x400280000
int main()
{
*pointer=1;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)