comconsole.c (50477) | comconsole.c (68358) |
---|---|
1/* 2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * | 1/* 2 * Copyright (c) 1998 Michael Smith (msmith@freebsd.org) 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/boot/pc98/libpc98/comconsole.c 50477 1999-08-28 01:08:13Z peter $ | 25 * $FreeBSD: head/sys/boot/pc98/libpc98/comconsole.c 68358 2000-11-05 12:35:41Z nyan $ |
26 */ 27 28#include <stand.h> 29#include <bootstrap.h> 30#include <machine/cpufunc.h> 31#include "libi386.h" 32 33/* selected defines from ns16550.h */ --- 79 unchanged lines hidden (view full) --- 113 114static void 115comc_putchar(int c) 116{ 117 int wait; 118 119 for (wait = COMC_TXWAIT; wait > 0; wait--) 120 if (inb(COMPORT + com_lsr) & LSR_TXRDY) { | 26 */ 27 28#include <stand.h> 29#include <bootstrap.h> 30#include <machine/cpufunc.h> 31#include "libi386.h" 32 33/* selected defines from ns16550.h */ --- 79 unchanged lines hidden (view full) --- 113 114static void 115comc_putchar(int c) 116{ 117 int wait; 118 119 for (wait = COMC_TXWAIT; wait > 0; wait--) 120 if (inb(COMPORT + com_lsr) & LSR_TXRDY) { |
121 outb(COMPORT + com_data, c); | 121 outb(COMPORT + com_data, (u_char)c); |
122 break; 123 } 124} 125 126static int 127comc_getchar(void) 128{ 129 return(comc_ischar() ? inb(COMPORT + com_data) : -1); 130} 131 132static int 133comc_ischar(void) 134{ 135 return(inb(COMPORT + com_lsr) & LSR_RXRDY); 136} | 122 break; 123 } 124} 125 126static int 127comc_getchar(void) 128{ 129 return(comc_ischar() ? inb(COMPORT + com_data) : -1); 130} 131 132static int 133comc_ischar(void) 134{ 135 return(inb(COMPORT + com_lsr) & LSR_RXRDY); 136} |