View difference between Paste ID: 3KwBvrRy and 6zzFjM7y
SHOW: | | - or go back to the newest paste.
1
.include "memorymap/uart.s"
2
3
.align 2
4
.arm
5
.global io_uart_dataready
6
#Check if a UART has data available.
7
#Parameters: r0=base address of the UART to check
8
#Sets r0 to nonzero if data is ready.
9
io_uart_dataready:
10-
        ldr r1, [r0, UART.LSR]
10+
        ldr r1, [r0, #UART.LSR]
11
        ldr r2, =0x7FFFFFFFFF
12
        and r0, r1, r2
13
        bx lr