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
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))
30 #define GDB_QUOTE_CHAR 15 /* ^O */
33 * outbyte -- send a byte to the UART.
36 _DEFUN (outbyte
, (ch
),
39 while (!(*SRREG
& TRDY
))
41 *TXREG
= GDB_QUOTE_CHAR
;
43 while (!(*SRREG
& TRDY
))
45 *TXREG
= (unsigned short)ch
;