diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2010-10-07 13:20:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-07 19:22:31 -0700 |
commit | c6e3fd22cd538365bfeb82997d5b89562e077d42 (patch) | |
tree | 5eaa170c9003abc7b24ab340ccabe889cba47992 /drivers/staging/speakup/serialio.h | |
parent | e59fe083f683ca2ca56abefad290d110808a6fb5 (diff) |
Staging: add speakup to the staging directory
Speakup is a kernel based screen review package for the linux operating
system. It allows blind users to interact with applications on the
linux console by means of synthetic speech.
The authors and maintainers of this code include the following:
Kirk Reiser, Andy Berdan, John Covici, Brian and
David Borowski, Christopher Brannon, Samuel Thibault and William Hubbs.
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/speakup/serialio.h')
-rw-r--r-- | drivers/staging/speakup/serialio.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/staging/speakup/serialio.h b/drivers/staging/speakup/serialio.h new file mode 100644 index 000000000000..d785b1f6a3b3 --- /dev/null +++ b/drivers/staging/speakup/serialio.h @@ -0,0 +1,55 @@ +#ifndef _SPEAKUP_SERIAL_H +#define _SPEAKUP_SERIAL_H + +#include <linux/serial.h> /* for rs_table, serial constants & + serial_uart_config */ +#include <linux/serial_reg.h> /* for more serial constants */ +#include <linux/serialP.h> /* for struct serial_state */ +#ifndef __sparc__ +#include <asm/serial.h> +#endif + +/* countdown values for serial timeouts in us */ +#define SPK_SERIAL_TIMEOUT 100000 +/* countdown values transmitter/dsr timeouts in us */ +#define SPK_XMITR_TIMEOUT 100000 +/* countdown values cts timeouts in us */ +#define SPK_CTS_TIMEOUT 100000 +/* check ttyS0 ... ttyS3 */ +#define SPK_LO_TTY 0 +#define SPK_HI_TTY 3 +/* # of timeouts permitted before disable */ +#define NUM_DISABLE_TIMEOUTS 3 +/* buffer timeout in ms */ +#define SPK_TIMEOUT 100 +#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) + +#define spk_serial_tx_busy() ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY) + +/* 2.6.22 doesn't have them any more, hardcode it for now (these values should + * be fine for 99% cases) */ +#ifndef BASE_BAUD +#define BASE_BAUD (1843200 / 16) +#endif +#ifndef STD_COM_FLAGS +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) +#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) +#else +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF +#endif +#endif +#ifndef SERIAL_PORT_DFNS +#define SERIAL_PORT_DFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ +#endif +#ifndef IRQF_SHARED +#define IRQF_SHARED SA_SHIRQ +#endif + +#endif |