fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / libgloss / mcore / cmb-outbyte.c
blobea2aaef8b7970e2e57d683f4f7c88a396ad5ea72
1 /* cmb-outbyte.c -- outbyte function for CMB1200 eval board.
3 * Copyright (c) 1999 Cygnus Support
5 * The authors hereby grant permission to use, copy, modify, distribute,
6 * and license this software and its documentation for any purpose, provided
7 * that existing copyright notices are retained in all copies and that this
8 * notice is included verbatim in any distributions. No written agreement,
9 * license, or royalty fee is required for any of the authorized uses.
10 * Modifications to this software may be copyrighted by their authors
11 * and need not follow the licensing terms described here, provided that
12 * the new terms are clearly indicated on the first page of each file where
13 * they apply.
15 #include <_ansi.h>
17 #define _TX 0x40
18 #define _SR 0x86
20 #define UART0_BASE 0x10009000
21 #define UART1_BASE 0x1000a000
23 #define UART_BASE UART0_BASE
25 #define TXREG ((volatile unsigned short *)(UART_BASE + _TX))
26 #define SRREG ((volatile unsigned short *)(UART_BASE + _SR))
28 #define TRDY 0x2000
30 #define GDB_QUOTE_CHAR 15 /* ^O */
33 * outbyte -- send a byte to the UART.
35 void
36 _DEFUN (outbyte, (ch),
37 char ch)
39 while (!(*SRREG & TRDY))
41 *TXREG = GDB_QUOTE_CHAR;
43 while (!(*SRREG & TRDY))
45 *TXREG = (unsigned short)ch;