Re: ethlcd driver improvements
Mariusz Bialonczyk <[email protected]>
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
On 2011-03-28 21:50, Markus Dolze wrote: > There is no way for a driver to signal the core to exit once the driver > is running, so using exit() is the only option if you want to quit LCDd. > However no cleanup of memory is performed then. I also was searching the way of clean exit from driver, but I can see that returning -1 works only in init function. So I used the same method like ie. in hd44780-ftdi.c. Do you think it would be better if I free some (PrivateData?) structures before? I know it would be a lot better if I do some kind of clean exit - but if I am correct, it also needs some changes not only in my driver. > What may be reasons why a send / receive fails? If it is the TCP > connection that broke maybe reconnecting may be an idea? From experience with my device I can tell that it sometimes hung (hardware). Then even ping packet are not replied. The only way to fix such a state is to cycle device's power. But this situation is very very rare - two-three times per year, when the device is working fine the rest of time (working non-stop). So I also thought about reconecting, but it doesn't help in this case, especialy because if I even successfuly reconnect after device start, then it won't work without executing commands in init function. > Not related to you patch: If your ethlcd device can handle more than one > byte of input you may take advantage of the small flush buffer available > now. Have a look at hd44780-lcd2usb.c on how to make use of it. I asume you're talking about tx_buffer struct. I'll think about it if I change the device protocol, because now it unfortunately cannot handle more data in one packet. Thank you for your tip. regards, -- Mariusz Białończyk jabber/e-mail: [email protected] http://manio.skyboo.net _______________________________________________ LCDproc mailing list [email protected] http://lists.omnipotent.net/mailman/listinfo/lcdproc