TQ210裸机编程(7)——UART+key(中断)
之前的按键中断程序是直接下载到DDR内存运行的,这次结合时钟和串口的知识,改善按键中断实验的程序。
运行效果:
Key and Uart Test
You are pressed key:1
You are pressed key:1
You are pressed key:1
You are pressed key:3
You are pressed key:2
You are pressed key:3
You are pressed key:4
You are pressed key:4
直接上代码
start.S
key.bin: start.o clock.o uart.o key.oarm-linux-ld -Ttext 0xD0020010 -o key.elf $^arm-linux-objcopy -O binary key.elf $@arm-linux-objdump -D key.elf > key.dis%.o : %.carm-linux-gcc -c $< -o $@%.o : %.Sarm-linux-gcc -c $< -o $@clean:rm *.o *.elf *.bin *.dis
程序烧写过程见《TQ210裸机编程(5)——系统时钟配置》
转载请注明来源:http://blog.csdn.net/zjhsucceed_329/