当前位置:网站首页>Programming knowledge -- basis of C language

Programming knowledge -- basis of C language

2022-07-05 07:52:00 Soy sauce;

1. Memory and pointer

describe
 Insert picture description here

How to access memory

It looks like the first address is stored , In fact, it recognizes continuous memory space

 Insert picture description here
 Insert picture description here

2. Control with pointer gpio

 Insert picture description here
 Insert picture description here
 Insert picture description here

int main()
{
	unsigned int *pGPFCON = (unsigned int *)0x56000050;
	unsigned int *pGPFDAT = (unsigned int *)0x56000054;

	/*  To configure GPF4 Is the output pin  */
	*pGPFCON = 0x100;
	
	/*  Set up GPF4 Output 0 */
	*pGPFDAT = 0;

	return 0;
}

原网站

版权声明
本文为[Soy sauce;]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140548511504.html