2018-01-11 11:08:40 +01:00
/* SPDX-License-Identifier: GPL-2.0+ */
2010-10-07 13:20:02 -05:00
/* spk_priv.h
2015-10-14 23:28:29 +03:00
* review functions for the speakup screen review package .
* originally written by : Kirk Reiser and Andy Berdan .
*
* extensively modified by David Borowski .
*
* Copyright ( C ) 1998 Kirk Reiser .
* Copyright ( C ) 2003 David Borowski .
*/
2010-10-07 13:20:02 -05:00
# ifndef _SPEAKUP_PRIVATE_H
# define _SPEAKUP_PRIVATE_H
2020-03-22 10:33:22 -04:00
# include <linux/printk.h>
2010-10-07 13:20:02 -05:00
# include "spk_types.h"
# include "spk_priv_keyinfo.h"
# define V_LAST_VAR { MAXVARS }
# define SPACE 0x20
# define SYNTH_CHECK 20030716 /* today's date ought to do for check value */
/* synth flags, for odd synths */
# define SF_DEC 1 /* to fiddle puncs in alpha strings so it doesn't spell */
# ifdef MODULE
# define SYNTH_START 1
# else
# define SYNTH_START 0
# endif
# define KT_SPKUP 15
2017-05-15 18:45:35 +01:00
# define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */
2017-06-25 19:40:01 +01:00
# define SYNTH_DEFAULT_DEV "ttyS0"
# define SYNTH_DEFAULT_SER 0
2010-10-07 13:20:02 -05:00
2015-02-26 18:42:36 -08:00
const struct old_serial_port * spk_serial_init ( int index ) ;
void spk_stop_serial_interrupt ( void ) ;
void spk_serial_release ( void ) ;
2017-05-15 18:45:33 +01:00
void spk_ttyio_release ( void ) ;
2017-07-16 17:18:25 +01:00
void spk_ttyio_register_ldisc ( void ) ;
void spk_ttyio_unregister_ldisc ( void ) ;
2010-10-07 13:20:02 -05:00
2017-03-04 15:01:55 +01:00
void synth_buffer_skip_nonlatin1 ( void ) ;
u16 synth_buffer_getc ( void ) ;
u16 synth_buffer_peek ( void ) ;
2015-02-26 18:42:36 -08:00
int synth_buffer_empty ( void ) ;
struct var_t * spk_get_var ( enum var_id_t var_id ) ;
ssize_t spk_var_show ( struct kobject * kobj , struct kobj_attribute * attr ,
char * buf ) ;
ssize_t spk_var_store ( struct kobject * kobj , struct kobj_attribute * attr ,
const char * buf , size_t count ) ;
2010-10-07 13:20:02 -05:00
2015-02-26 18:42:36 -08:00
int spk_serial_synth_probe ( struct spk_synth * synth ) ;
2017-05-15 18:45:33 +01:00
int spk_ttyio_synth_probe ( struct spk_synth * synth ) ;
2018-11-06 02:29:10 +00:00
const char * spk_serial_synth_immediate ( struct spk_synth * synth ,
const char * buff ) ;
const char * spk_ttyio_synth_immediate ( struct spk_synth * synth ,
const char * buff ) ;
2015-02-26 18:42:36 -08:00
void spk_do_catch_up ( struct spk_synth * synth ) ;
2018-03-10 11:56:27 +01:00
void spk_do_catch_up_unicode ( struct spk_synth * synth ) ;
2015-02-26 18:42:36 -08:00
void spk_synth_flush ( struct spk_synth * synth ) ;
2017-04-29 20:52:58 +01:00
unsigned char spk_synth_get_index ( struct spk_synth * synth ) ;
2015-02-26 18:42:36 -08:00
int spk_synth_is_alive_nop ( struct spk_synth * synth ) ;
int spk_synth_is_alive_restart ( struct spk_synth * synth ) ;
2017-03-04 08:13:11 -08:00
__printf ( 1 , 2 )
2015-02-26 18:42:36 -08:00
void synth_printf ( const char * buf , . . . ) ;
2017-03-04 15:01:55 +01:00
void synth_putwc ( u16 wc ) ;
void synth_putwc_s ( u16 wc ) ;
void synth_putws ( const u16 * buf ) ;
void synth_putws_s ( const u16 * buf ) ;
2017-02-04 17:49:00 +13:00
int synth_request_region ( unsigned long start , unsigned long n ) ;
int synth_release_region ( unsigned long start , unsigned long n ) ;
2015-02-26 18:42:36 -08:00
int synth_add ( struct spk_synth * in_synth ) ;
void synth_remove ( struct spk_synth * in_synth ) ;
2019-03-07 23:06:57 +01:00
struct spk_synth * synth_current ( void ) ;
2010-10-07 13:20:02 -05:00
extern struct speakup_info_t speakup_info ;
extern struct var_t synth_time_vars [ ] ;
2017-03-14 13:41:53 +00:00
extern struct spk_io_ops spk_serial_io_ops ;
2017-05-15 18:45:33 +01:00
extern struct spk_io_ops spk_ttyio_ops ;
2017-03-14 13:41:53 +00:00
2010-10-07 13:20:02 -05:00
# endif