comparison lldbg/serio.S @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 #include "../include/config.h"
2 #include "ns16550.h"
3
4 /* this module implements the elementary serial I/O operations */
5
6 .text
7 .code 32
8 .globl lldbg_serial_out
9 lldbg_serial_out:
10 ldr r2, =CONFIG_LLDBG_UART_BASE
11 1: ldrb r3, [r2, #NS16550_LSR]
12 tst r3, #NS16550_LSR_THRE
13 beq 1b
14 strb r0, [r2, #NS16550_THR]
15 bx lr
16
17 .globl lldbg_serial_in_poll
18 lldbg_serial_in_poll:
19 ldr r2, =CONFIG_LLDBG_UART_BASE
20 ldrb r3, [r2, #NS16550_LSR]
21 tst r3, #NS16550_LSR_DR
22 ldrneb r0, [r2, #NS16550_RBR]
23 mvneq r0, #0
24 bx lr
25
26 #if 0 // not needed currently
27 .globl lldbg_serial_flush
28 lldbg_serial_flush:
29 ldr r2, =CONFIG_LLDBG_UART_BASE
30 1: ldrb r3, [r2, #NS16550_LSR]
31 tst r3, #NS16550_LSR_TEMP
32 beq 1b
33 bx lr
34 #endif