Re: best way to handle LEDs

Pavel Machek
2005-11-03T13:32:01Z

Hi!

> > Except the led code that is being proposed CAN sit on top of a generic
> > GPIO layer.
>
> I also have issues with a generic GPIO layer. As I mentioned in the
> past, there's serious locking issues with any generic abstraction of
> GPIOs.
>
> 1. You want to be able to change GPIO state from interrupts. This
> implies you can not sleep in GPIO state changing functions.
>
> 2. Some GPIOs are implemented on I2C devices. This means that to
> change state, you must sleep.

Can't you just busywait? Yes, it is ugly in general, but perhaps it
is better than alternatives...

--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms