hd44780-serial.c
Stephen Crane <[email protected]> Fri, 22 Jun 2012 15:52:52 +0100
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <CAMhwZi5-+T4tQviPMqNAkpuA+PxjVNoP4x=907gR+TSu_c-cuA@mail.gmail.com> |
Hello all,
I have a rather unusual setup with an XBee on /dev/ttyUSB0 connected to a
remote display which uses hd44780-serial.c as the driver.
I have noticed that the display gets messed up from time to time, as if
characters are being dropped or lost in transmission. Browsing the driver,
I notice that the return value from write is ignored, so I replaced all
calls to write with a do_write function like this:
static void do_write(int fd, const unsigned char *c, int n)
{
while (n > 0) {
int wrote = write(fd, c, n);
if (wrote > 0)
n -= wrote;
else {
perror("write");
break;
}
}
}
With this in place, I see a ton of EAGAIN errors which would certainly
account for the dropped characters, right?
Would the list accept a patch for this file? (I note that most drivers have
the same problem...)
Steve
_______________________________________________
LCDproc mailing list
[email protected]
http://lists.omnipotent.net/mailman/listinfo/lcdproc