view target-utils/libcommon/serflush.S @ 107:8b44e806b6e1

loadtools/README: documentation for loadtools should now be complete
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 13 Sep 2013 16:47:09 +0000
parents 1a3bbab2ea26
children
line wrap: on
line source

#include "ns16550.h"

	.text
	.code	32
	.global	serial_flush
serial_flush:
	ldr	r1, =uart_base
	ldr	r2, [r1]
1:	ldrb	r3, [r2, #NS16550_LSR]
	tst	r3, #NS16550_LSR_TEMP
	beq	1b
	bx	lr