0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef _SPEAKUP_PRIVATE_H
0012 #define _SPEAKUP_PRIVATE_H
0013
0014 #include <linux/printk.h>
0015
0016 #include "spk_types.h"
0017 #include "spk_priv_keyinfo.h"
0018
0019 #define V_LAST_VAR { MAXVARS }
0020 #define SPACE 0x20
0021 #define SYNTH_CHECK 20030716
0022
0023 #define SF_DEC 1
0024 #ifdef MODULE
0025 #define SYNTH_START 1
0026 #else
0027 #define SYNTH_START 0
0028 #endif
0029
0030 #define KT_SPKUP 15
0031 #define SPK_SYNTH_TIMEOUT 100000
0032 #define SYNTH_DEFAULT_DEV "ttyS0"
0033 #define SYNTH_DEFAULT_SER 0
0034
0035 const struct old_serial_port *spk_serial_init(int index);
0036 void spk_stop_serial_interrupt(void);
0037 void spk_serial_release(struct spk_synth *synth);
0038 void spk_ttyio_release(struct spk_synth *synth);
0039 void spk_ttyio_register_ldisc(void);
0040 void spk_ttyio_unregister_ldisc(void);
0041
0042 void synth_buffer_skip_nonlatin1(void);
0043 u16 synth_buffer_getc(void);
0044 u16 synth_buffer_peek(void);
0045 int synth_buffer_empty(void);
0046 struct var_t *spk_get_var(enum var_id_t var_id);
0047 ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
0048 char *buf);
0049 ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
0050 const char *buf, size_t count);
0051
0052 int spk_serial_synth_probe(struct spk_synth *synth);
0053 int spk_ttyio_synth_probe(struct spk_synth *synth);
0054 const char *spk_serial_synth_immediate(struct spk_synth *synth,
0055 const char *buff);
0056 const char *spk_ttyio_synth_immediate(struct spk_synth *synth,
0057 const char *buff);
0058 void spk_do_catch_up(struct spk_synth *synth);
0059 void spk_do_catch_up_unicode(struct spk_synth *synth);
0060 void spk_synth_flush(struct spk_synth *synth);
0061 unsigned char spk_synth_get_index(struct spk_synth *synth);
0062 int spk_synth_is_alive_nop(struct spk_synth *synth);
0063 int spk_synth_is_alive_restart(struct spk_synth *synth);
0064 __printf(1, 2)
0065 void synth_printf(const char *buf, ...);
0066 void synth_putwc(u16 wc);
0067 void synth_putwc_s(u16 wc);
0068 void synth_putws(const u16 *buf);
0069 void synth_putws_s(const u16 *buf);
0070 int synth_request_region(unsigned long start, unsigned long n);
0071 int synth_release_region(unsigned long start, unsigned long n);
0072 int synth_add(struct spk_synth *in_synth);
0073 void synth_remove(struct spk_synth *in_synth);
0074 struct spk_synth *synth_current(void);
0075
0076 extern struct speakup_info_t speakup_info;
0077
0078 extern struct var_t synth_time_vars[];
0079
0080 extern struct spk_io_ops spk_serial_io_ops;
0081 extern struct spk_io_ops spk_ttyio_ops;
0082
0083 #endif