18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
28c2ecf20Sopenharmony_ci/* spk_priv.h
38c2ecf20Sopenharmony_ci * review functions for the speakup screen review package.
48c2ecf20Sopenharmony_ci * originally written by: Kirk Reiser and Andy Berdan.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * extensively modified by David Borowski.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Copyright (C) 1998  Kirk Reiser.
98c2ecf20Sopenharmony_ci * Copyright (C) 2003  David Borowski.
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_ci#ifndef _SPEAKUP_PRIVATE_H
128c2ecf20Sopenharmony_ci#define _SPEAKUP_PRIVATE_H
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/printk.h>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include "spk_types.h"
178c2ecf20Sopenharmony_ci#include "spk_priv_keyinfo.h"
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#define V_LAST_VAR { MAXVARS }
208c2ecf20Sopenharmony_ci#define SPACE 0x20
218c2ecf20Sopenharmony_ci#define SYNTH_CHECK 20030716 /* today's date ought to do for check value */
228c2ecf20Sopenharmony_ci/* synth flags, for odd synths */
238c2ecf20Sopenharmony_ci#define SF_DEC 1 /* to fiddle puncs in alpha strings so it doesn't spell */
248c2ecf20Sopenharmony_ci#ifdef MODULE
258c2ecf20Sopenharmony_ci#define SYNTH_START 1
268c2ecf20Sopenharmony_ci#else
278c2ecf20Sopenharmony_ci#define SYNTH_START 0
288c2ecf20Sopenharmony_ci#endif
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#define KT_SPKUP 15
318c2ecf20Sopenharmony_ci#define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
328c2ecf20Sopenharmony_ci#define SYNTH_DEFAULT_DEV "ttyS0"
338c2ecf20Sopenharmony_ci#define SYNTH_DEFAULT_SER 0
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciconst struct old_serial_port *spk_serial_init(int index);
368c2ecf20Sopenharmony_civoid spk_stop_serial_interrupt(void);
378c2ecf20Sopenharmony_civoid spk_serial_release(void);
388c2ecf20Sopenharmony_civoid spk_ttyio_release(void);
398c2ecf20Sopenharmony_civoid spk_ttyio_register_ldisc(void);
408c2ecf20Sopenharmony_civoid spk_ttyio_unregister_ldisc(void);
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_civoid synth_buffer_skip_nonlatin1(void);
438c2ecf20Sopenharmony_ciu16 synth_buffer_getc(void);
448c2ecf20Sopenharmony_ciu16 synth_buffer_peek(void);
458c2ecf20Sopenharmony_ciint synth_buffer_empty(void);
468c2ecf20Sopenharmony_cistruct var_t *spk_get_var(enum var_id_t var_id);
478c2ecf20Sopenharmony_cissize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
488c2ecf20Sopenharmony_ci		     char *buf);
498c2ecf20Sopenharmony_cissize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
508c2ecf20Sopenharmony_ci		      const char *buf, size_t count);
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciint spk_serial_synth_probe(struct spk_synth *synth);
538c2ecf20Sopenharmony_ciint spk_ttyio_synth_probe(struct spk_synth *synth);
548c2ecf20Sopenharmony_ciconst char *spk_serial_synth_immediate(struct spk_synth *synth,
558c2ecf20Sopenharmony_ci				       const char *buff);
568c2ecf20Sopenharmony_ciconst char *spk_ttyio_synth_immediate(struct spk_synth *synth,
578c2ecf20Sopenharmony_ci				      const char *buff);
588c2ecf20Sopenharmony_civoid spk_do_catch_up(struct spk_synth *synth);
598c2ecf20Sopenharmony_civoid spk_do_catch_up_unicode(struct spk_synth *synth);
608c2ecf20Sopenharmony_civoid spk_synth_flush(struct spk_synth *synth);
618c2ecf20Sopenharmony_ciunsigned char spk_synth_get_index(struct spk_synth *synth);
628c2ecf20Sopenharmony_ciint spk_synth_is_alive_nop(struct spk_synth *synth);
638c2ecf20Sopenharmony_ciint spk_synth_is_alive_restart(struct spk_synth *synth);
648c2ecf20Sopenharmony_ci__printf(1, 2)
658c2ecf20Sopenharmony_civoid synth_printf(const char *buf, ...);
668c2ecf20Sopenharmony_civoid synth_putwc(u16 wc);
678c2ecf20Sopenharmony_civoid synth_putwc_s(u16 wc);
688c2ecf20Sopenharmony_civoid synth_putws(const u16 *buf);
698c2ecf20Sopenharmony_civoid synth_putws_s(const u16 *buf);
708c2ecf20Sopenharmony_ciint synth_request_region(unsigned long start, unsigned long n);
718c2ecf20Sopenharmony_ciint synth_release_region(unsigned long start, unsigned long n);
728c2ecf20Sopenharmony_ciint synth_add(struct spk_synth *in_synth);
738c2ecf20Sopenharmony_civoid synth_remove(struct spk_synth *in_synth);
748c2ecf20Sopenharmony_cistruct spk_synth *synth_current(void);
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ciextern struct speakup_info_t speakup_info;
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ciextern struct var_t synth_time_vars[];
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciextern struct spk_io_ops spk_serial_io_ops;
818c2ecf20Sopenharmony_ciextern struct spk_io_ops spk_ttyio_ops;
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci#endif
84