实例:1.3.4版本at91sam系列
GPIO部分:
一、初始化:
includeasm-armarch-at91sam9gpio.h
1.同一引脚的复用设置
2.输入输出初始化寄存器
3.得到基地址、设置值
二、写
includeasm-armarch-at91sam9io.h
includeasm-armio.h
#define __raw_writel(v,a) __arch_putl(v,a)
#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
三、读
includeasm-armio.h
#define __raw_readl(a) __arch_getl(a)
#define __arch_getl(a) (*(volatile unsigned int *)(a))