2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
* normal/completion.c (complete_arguments): Add the qualifier const into OPTIONS. From Omniflux <omniflux+lists@omniflux.com>: * include/grub/terminfo.h: New file. * include/grub/tparm.h: Likewise. * include/grub/i386/pc/serial.h: Likewise. * term/terminfo.c: Likewise. * term/tparm.c: Likewise. * term/i386/pc/serial.c: Likewise. * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and serial.mod. (terminfo_mod_SOURCES): New variable. (terminfo_mod_CFLAGS): Likewise. (serial_mod_SOURCES): Likewise. (serial_mod_CFLAGS): Likewise.
This commit is contained in:
parent
48b671ff70
commit
47d2d65e33
12 changed files with 1892 additions and 4 deletions
68
include/grub/i386/pc/serial.h
Normal file
68
include/grub/i386/pc/serial.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
/* serial.h - serial device interface */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2000,2001,2002,2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_SERIAL_MACHINE_HEADER
|
||||
#define GRUB_SERIAL_MACHINE_HEADER 1
|
||||
|
||||
/* Macros. */
|
||||
|
||||
/* The offsets of UART registers. */
|
||||
#define UART_TX 0
|
||||
#define UART_RX 0
|
||||
#define UART_DLL 0
|
||||
#define UART_IER 1
|
||||
#define UART_DLH 1
|
||||
#define UART_IIR 2
|
||||
#define UART_FCR 2
|
||||
#define UART_LCR 3
|
||||
#define UART_MCR 4
|
||||
#define UART_LSR 5
|
||||
#define UART_MSR 6
|
||||
#define UART_SR 7
|
||||
|
||||
/* For LSR bits. */
|
||||
#define UART_DATA_READY 0x01
|
||||
#define UART_EMPTY_TRANSMITTER 0x20
|
||||
|
||||
/* The type of parity. */
|
||||
#define UART_NO_PARITY 0x00
|
||||
#define UART_ODD_PARITY 0x08
|
||||
#define UART_EVEN_PARITY 0x18
|
||||
|
||||
/* The type of word length. */
|
||||
#define UART_5BITS_WORD 0x00
|
||||
#define UART_6BITS_WORD 0x01
|
||||
#define UART_7BITS_WORD 0x02
|
||||
#define UART_8BITS_WORD 0x03
|
||||
|
||||
/* The type of the length of stop bit. */
|
||||
#define UART_1_STOP_BIT 0x00
|
||||
#define UART_2_STOP_BITS 0x04
|
||||
|
||||
/* the switch of DLAB. */
|
||||
#define UART_DLAB 0x80
|
||||
|
||||
/* Enable the FIFO. */
|
||||
#define UART_ENABLE_FIFO 0xC7
|
||||
|
||||
/* Turn on DTR, RTS, and OUT2. */
|
||||
#define UART_ENABLE_MODEM 0x0B
|
||||
|
||||
#endif /* ! GRUB_SERIAL_MACHINE_HEADER */
|
36
include/grub/terminfo.h
Normal file
36
include/grub/terminfo.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_TERMINFO_HEADER
|
||||
#define GRUB_TERMINFO_HEADER 1
|
||||
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
char *grub_terminfo_get_current (void);
|
||||
grub_err_t grub_terminfo_set_current (const char *);
|
||||
|
||||
void grub_terminfo_gotoxy (grub_uint8_t x, grub_uint8_t y);
|
||||
void grub_terminfo_cls (void);
|
||||
void grub_terminfo_reverse_video_on (void);
|
||||
void grub_terminfo_reverse_video_off (void);
|
||||
void grub_terminfo_cursor_on (void);
|
||||
void grub_terminfo_cursor_off (void);
|
||||
|
||||
#endif /* ! GRUB_TERMINFO_HEADER */
|
27
include/grub/tparm.h
Normal file
27
include/grub/tparm.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* tparm.h - parameter formatting of terminfo */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_TPARM_HEADER
|
||||
#define GRUB_TPARM_HEADER 1
|
||||
|
||||
/* Function prototypes. */
|
||||
char *grub_terminfo_tparm (const char *string, ...);
|
||||
|
||||
#endif /* ! GRUB_TPARM_HEADER */
|
Loading…
Add table
Add a link
Reference in a new issue