1.步骤
2.核心代码
#define GPKCON 0X7F008800 #define GPKDAT 0X7F008808 light_led: ldr r0,=GPKCON ldr r1,=0x11110000 str r1,[r0] ldr r0,=GPKDAT ldr r1,=0xa0 str r1,[r0] mov pc,lr
注:使用6410还需要外设基地址初始化(c15, Peripheral Port Memory Remap Register)
set_peri_port: ldr r0,=0x70000000 orr r0,r0,#0x13 mcr p15,0,r0,c15,c2,4 mov pc,lr