162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */ 262306a36Sopenharmony_ci/* spk_priv.h 362306a36Sopenharmony_ci * review functions for the speakup screen review package. 462306a36Sopenharmony_ci * originally written by: Kirk Reiser and Andy Berdan. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * extensively modified by David Borowski. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Copyright (C) 1998 Kirk Reiser. 962306a36Sopenharmony_ci * Copyright (C) 2003 David Borowski. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci#ifndef _SPEAKUP_PRIVATE_H 1262306a36Sopenharmony_ci#define _SPEAKUP_PRIVATE_H 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include <linux/printk.h> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#include "spk_types.h" 1762306a36Sopenharmony_ci#include "spk_priv_keyinfo.h" 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#define V_LAST_VAR { MAXVARS } 2062306a36Sopenharmony_ci#define SPACE 0x20 2162306a36Sopenharmony_ci#define SYNTH_CHECK 20030716 /* today's date ought to do for check value */ 2262306a36Sopenharmony_ci/* synth flags, for odd synths */ 2362306a36Sopenharmony_ci#define SF_DEC 1 /* to fiddle puncs in alpha strings so it doesn't spell */ 2462306a36Sopenharmony_ci#ifdef MODULE 2562306a36Sopenharmony_ci#define SYNTH_START 1 2662306a36Sopenharmony_ci#else 2762306a36Sopenharmony_ci#define SYNTH_START 0 2862306a36Sopenharmony_ci#endif 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define KT_SPKUP 15 3162306a36Sopenharmony_ci#define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */ 3262306a36Sopenharmony_ci#define SYNTH_DEFAULT_DEV "ttyS0" 3362306a36Sopenharmony_ci#define SYNTH_DEFAULT_SER 0 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciconst struct old_serial_port *spk_serial_init(int index); 3662306a36Sopenharmony_civoid spk_stop_serial_interrupt(void); 3762306a36Sopenharmony_civoid spk_serial_release(struct spk_synth *synth); 3862306a36Sopenharmony_civoid spk_ttyio_release(struct spk_synth *synth); 3962306a36Sopenharmony_civoid spk_ttyio_register_ldisc(void); 4062306a36Sopenharmony_civoid spk_ttyio_unregister_ldisc(void); 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_civoid synth_buffer_skip_nonlatin1(void); 4362306a36Sopenharmony_ciu16 synth_buffer_getc(void); 4462306a36Sopenharmony_ciu16 synth_buffer_peek(void); 4562306a36Sopenharmony_ciint synth_buffer_empty(void); 4662306a36Sopenharmony_cistruct var_t *spk_get_var(enum var_id_t var_id); 4762306a36Sopenharmony_cissize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr, 4862306a36Sopenharmony_ci char *buf); 4962306a36Sopenharmony_cissize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr, 5062306a36Sopenharmony_ci const char *buf, size_t count); 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciint spk_serial_synth_probe(struct spk_synth *synth); 5362306a36Sopenharmony_ciint spk_ttyio_synth_probe(struct spk_synth *synth); 5462306a36Sopenharmony_ciconst char *spk_serial_synth_immediate(struct spk_synth *synth, 5562306a36Sopenharmony_ci const char *buff); 5662306a36Sopenharmony_ciconst char *spk_ttyio_synth_immediate(struct spk_synth *synth, 5762306a36Sopenharmony_ci const char *buff); 5862306a36Sopenharmony_civoid spk_do_catch_up(struct spk_synth *synth); 5962306a36Sopenharmony_civoid spk_do_catch_up_unicode(struct spk_synth *synth); 6062306a36Sopenharmony_civoid spk_synth_flush(struct spk_synth *synth); 6162306a36Sopenharmony_ciunsigned char spk_synth_get_index(struct spk_synth *synth); 6262306a36Sopenharmony_ciint spk_synth_is_alive_nop(struct spk_synth *synth); 6362306a36Sopenharmony_ciint spk_synth_is_alive_restart(struct spk_synth *synth); 6462306a36Sopenharmony_ci__printf(1, 2) 6562306a36Sopenharmony_civoid synth_printf(const char *buf, ...); 6662306a36Sopenharmony_civoid synth_putwc(u16 wc); 6762306a36Sopenharmony_civoid synth_putwc_s(u16 wc); 6862306a36Sopenharmony_civoid synth_putws(const u16 *buf); 6962306a36Sopenharmony_civoid synth_putws_s(const u16 *buf); 7062306a36Sopenharmony_ciint synth_request_region(unsigned long start, unsigned long n); 7162306a36Sopenharmony_ciint synth_release_region(unsigned long start, unsigned long n); 7262306a36Sopenharmony_ciint synth_add(struct spk_synth *in_synth); 7362306a36Sopenharmony_civoid synth_remove(struct spk_synth *in_synth); 7462306a36Sopenharmony_cistruct spk_synth *synth_current(void); 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ciextern struct speakup_info_t speakup_info; 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciextern struct var_t synth_time_vars[]; 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ciextern struct spk_io_ops spk_serial_io_ops; 8162306a36Sopenharmony_ciextern struct spk_io_ops spk_ttyio_ops; 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci#endif 84