Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Raspberry Pi ACT LED



Stephan <stephanwib%googlemail.com@localhost> writes:

> Okay, LED_ON() and LED_OFF() is pseudo-code and should have indicated
> the place to put the control functions in. The next question would be
> how to control the LED - for example by utilizing the GPIO framework
> or driver, which might be too much overhead. Another way could be
> writing directly to the corresponding register. I guess the given code
> snipped runs in process context and waits on a CV which gets signalled
> from the interrupt context?!

My quick reaction is that we have frameworks for a reason (to keep code
understandable, maintainable, and extensible), so you should use them.
It seems unreasonable to open-code using the register directly.
Certainly it's unreasonable without profiling to show that it helps and
is worth the loss of abstraction.

If there are efficiency issues, it would make more sense to turn on the
light once when things start to happen and set a timer for 100ms to turn
it off, or seomthing.

[top-posting repaired by trimming]

Attachment: pgpZ2fmZiPSyW.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index