This source file includes following definitions.
- putc
- flush
1
2
3
4
5
6
7
8
9
10 #include "hardware.h"
11
12 #define IOMEM(x) (x)
13
14
15
16
17
18
19
20
21 #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
22
23 static inline void putc(int c)
24 {
25 unsigned long serial_port;
26
27 do {
28 serial_port = _Ser3UTCR0;
29 if (UART(UTCR3) & UTCR3_TXE) break;
30 serial_port = _Ser1UTCR0;
31 if (UART(UTCR3) & UTCR3_TXE) break;
32 serial_port = _Ser2UTCR0;
33 if (UART(UTCR3) & UTCR3_TXE) break;
34 return;
35 } while (0);
36
37
38 while (!(UART(UTSR1) & UTSR1_TNF))
39 barrier();
40
41
42 UART(UTDR) = c;
43 }
44
45 static inline void flush(void)
46 {
47 }
48
49
50
51
52 #define arch_decomp_setup()