public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: David <david.a.borowski@gmail.com>
To: speakup@linux-speakup.org
Subject: using system serial tty drivers
Date: Fri, 18 Nov 2016 12:27:47 -0500	[thread overview]
Message-ID: <20161118172747.GA25081@db> (raw)

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


             reply	other threads:[~ UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 David [this message]
 ` Samuel Thibault
   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161118172747.GA25081@db \
    --to=david.a.borowski@gmail.com \
    --cc=speakup@linux-speakup.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).