linux/drivers/staging/speakup/spk_priv.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0+ */
   2/* spk_priv.h
   3 * review functions for the speakup screen review package.
   4 * originally written by: Kirk Reiser and Andy Berdan.
   5 *
   6 * extensively modified by David Borowski.
   7 *
   8 * Copyright (C) 1998  Kirk Reiser.
   9 * Copyright (C) 2003  David Borowski.
  10 */
  11#ifndef _SPEAKUP_PRIVATE_H
  12#define _SPEAKUP_PRIVATE_H
  13
  14#include "spk_types.h"
  15#include "spk_priv_keyinfo.h"
  16
  17#ifndef pr_warn
  18#define pr_warn(fmt, arg...) printk(KERN_WARNING fmt, ##arg)
  19#endif
  20
  21#define V_LAST_VAR { MAXVARS }
  22#define SPACE 0x20
  23#define SYNTH_CHECK 20030716 /* today's date ought to do for check value */
  24/* synth flags, for odd synths */
  25#define SF_DEC 1 /* to fiddle puncs in alpha strings so it doesn't spell */
  26#ifdef MODULE
  27#define SYNTH_START 1
  28#else
  29#define SYNTH_START 0
  30#endif
  31
  32#define KT_SPKUP 15
  33#define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
  34#define SYNTH_DEFAULT_DEV "ttyS0"
  35#define SYNTH_DEFAULT_SER 0
  36
  37const struct old_serial_port *spk_serial_init(int index);
  38void spk_stop_serial_interrupt(void);
  39int spk_wait_for_xmitr(struct spk_synth *in_synth);
  40void spk_serial_release(void);
  41void spk_ttyio_release(void);
  42void spk_ttyio_register_ldisc(void);
  43void spk_ttyio_unregister_ldisc(void);
  44
  45void synth_buffer_skip_nonlatin1(void);
  46u16 synth_buffer_getc(void);
  47u16 synth_buffer_peek(void);
  48int synth_buffer_empty(void);
  49struct var_t *spk_get_var(enum var_id_t var_id);
  50ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
  51                     char *buf);
  52ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
  53                      const char *buf, size_t count);
  54
  55int spk_serial_synth_probe(struct spk_synth *synth);
  56int spk_ttyio_synth_probe(struct spk_synth *synth);
  57const char *spk_serial_synth_immediate(struct spk_synth *synth, const char *buff);
  58const char *spk_ttyio_synth_immediate(struct spk_synth *synth, const char *buff);
  59void spk_do_catch_up(struct spk_synth *synth);
  60void spk_do_catch_up_unicode(struct spk_synth *synth);
  61void spk_synth_flush(struct spk_synth *synth);
  62unsigned char spk_synth_get_index(struct spk_synth *synth);
  63int spk_synth_is_alive_nop(struct spk_synth *synth);
  64int spk_synth_is_alive_restart(struct spk_synth *synth);
  65__printf(1, 2)
  66void synth_printf(const char *buf, ...);
  67void synth_putwc(u16 wc);
  68void synth_putwc_s(u16 wc);
  69void synth_putws(const u16 *buf);
  70void synth_putws_s(const u16 *buf);
  71int synth_request_region(unsigned long start, unsigned long n);
  72int synth_release_region(unsigned long start, unsigned long n);
  73int synth_add(struct spk_synth *in_synth);
  74void synth_remove(struct spk_synth *in_synth);
  75
  76extern struct speakup_info_t speakup_info;
  77
  78extern struct var_t synth_time_vars[];
  79
  80extern struct spk_io_ops spk_serial_io_ops;
  81extern struct spk_io_ops spk_ttyio_ops;
  82
  83#endif
  84