Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: [ANNOUNCE] vdr-serial-0.0.1
At Mittwoch, 9. Juli 2003 13:00 Ralf Klueber wrote:
> I managed yesterday to get it all running. You find it under
> www.lf-klueber.de/vdr-serial-0.0.1.tgz . At the moment there is one
> major drawback. The permanent polling of the serial line lasts to 90%
> CPU load for VDR.
>
> So my question is how to slow done things a bit that the load is less. I
> tried do insert something like delay_ms(200) somewhere whithin the code
> but with no result.
>
> [...]
Hello Ralf,
I didn't want to pollute the ML, so this one goes out in private. I've been
stumbling over exactly the same things than you (I suppose) for my parallel
panel.
First, I guess the high CPU load is created by LOCK_THREAD, which you
probably don't even need (I don't). The Polling is basically the same with
my PlugIn, except that I do a usleep(1) delay. That is not really one
microsecond, but simply yields the scheduler to have other processes work,
and then returns from usleep(). No CPU usage visible at all.
Second, I suppose you'd like to use the frontpanel as the ONLY remote, am I
right? Maybe you'd like to add an (compile-time?) option not to derive your
class from cRemote, because if you want to use the frontpanel as an
extension to a LIRC remote, VDR will only learn one remote. Besides, if the
functions of the buttons are fixed, you could just place a
cRemote::Put(kDown) if the front-panel DOWN button is pressed, and so on. I
don't think it is senseful to learn a remote which keys are fixed anyways
:-)
Third, since our PlugIns are similar, what do you think about the idea of
writing a combined plugin for home-brew panels? I could think of using the
i2c-parallel driver to drive a PCF-chip (8-bit I/O controlled with only 2
pins) to extend the possible number of leds and buttons to almost infinite
:-) (2 pins = one bus = 256 devices = 2048 ports)
Greetings,
Sascha
P.S.: Achja vergessen. Nächstes mal schreib ich auch Deutsch :-)
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index