1 |
/* serial.h - serial device interface */ |
/* serial.h - serial device interface */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 2000, 2001 Free Software Foundation, Inc. |
* Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
68 |
|
|
69 |
/* Function prototypes. */ |
/* Function prototypes. */ |
70 |
|
|
71 |
/* The serial part of grub_putchar. */ |
/* Fetch a key. */ |
72 |
void serial_putchar (int c); |
int serial_hw_fetch (void); |
73 |
|
|
74 |
/* The serial part of getkey. */ |
/* Put a character. */ |
75 |
int serial_getkey (void); |
void serial_hw_put (int c); |
76 |
|
|
77 |
/* The serial part of checkkey. */ |
/* Insert a delay. */ |
78 |
int serial_checkkey (void); |
void serial_hw_delay (void); |
|
|
|
|
/* The serial part of cls. */ |
|
|
void serial_cls (void); |
|
|
|
|
|
/* The serial part of getxy. */ |
|
|
int serial_getxy (void); |
|
|
|
|
|
/* The serial part of gotoxy. */ |
|
|
void serial_gotoxy (int x, int y); |
|
79 |
|
|
80 |
/* Return the port number for the UNITth serial device. */ |
/* Return the port number for the UNITth serial device. */ |
81 |
unsigned short serial_get_port (int unit); |
unsigned short serial_hw_get_port (int unit); |
82 |
|
|
83 |
/* Initialize a serial device. */ |
/* Initialize a serial device. */ |
84 |
int serial_init (unsigned short port, unsigned int speed, |
int serial_hw_init (unsigned short port, unsigned int speed, |
85 |
int word_len, int parity, int stop_bit_len); |
int word_len, int parity, int stop_bit_len); |
|
|
|
|
/* Check if a serial port is set up. */ |
|
|
int serial_exists (void); |
|
86 |
|
|
87 |
#ifdef GRUB_UTIL |
#ifdef GRUB_UTIL |
88 |
/* Set the file name of a serial device (or a pty device). This is a |
/* Set the file name of a serial device (or a pty device). This is a |
89 |
function specific to the grub shell. */ |
function specific to the grub shell. */ |
90 |
void set_serial_device (const char *device); |
void serial_set_device (const char *device); |
91 |
#endif /* GRUB_UTIL */ |
#endif /* GRUB_UTIL */ |
92 |
|
|
93 |
#endif /* ! GRUB_SERIAL_HEADER */ |
#endif /* ! GRUB_SERIAL_HEADER */ |