public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* using system serial tty drivers
@  David
   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: David @  UTC (permalink / raw)
  To: speakup

The purpose of defines is that all drivers will dump the old serial stuff
eventually. Just wrappping serial_out to do one character transfers
is a performance hit big time. that is why I refactored the buffer handlers
so you can do.
while ( (bytes = synth_buffer_status(true) ) != 0) {
if (bytes < 0) {
// flush code goes here
// drain tty buffers etc. and break loop
}
// we have something to write to synth
this_write = synth_buffer_gets(my_buff, 256 );
written = write_serial(fd, my_buff,  this_write);
if (written < this_write)
synth_buffer_ungets(this_write-written);
// synth is full so push back unwritten chars and  wait ...
}
} // do_catchup


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 using system serial tty drivers David
 ` Samuel Thibault
   ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).