[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
|
|
Subscribe / Log in / New account

GPIO in the kernel: future directions

GPIO in the kernel: future directions

Posted Jan 24, 2013 19:50 UTC (Thu) by dlang (guest, #313)
In reply to: GPIO in the kernel: future directions by jimparis
Parent article: GPIO in the kernel: future directions

if you are using the GPIOs to control a stepper motor directly, you can accept delay in making changes, but you _really_ want to have all the changes happen at the same time.

There is also the chance that changing multiple bits at once is much easier than changing one bit at a time.

If you were to use a parallel printer port as a GPIO (it has 8 outputs and 3 inputs IIRC), it's much easier to change all 8 bits at once than to change one bit at a time.

The only thing I find questionable with the concept is that it allows grouping GPIO lines that do not have any underlying connection, but that doesn't make things any worse than they are now (other than possibly fooling the programmer into thinking they are better than they are now), and the improvements in the code of things using GPIO lines can be significant.

one place this would make a huge amount of sense from a software point of view is if you are connected to a small LCD display through a parallel interface (very common for 16 character x 2 line displays for example).

with this interface, you can do

nibble = *c & 0x0F;
output(nibble);
toggle(clock);
nibble = *c++ <<4 & 0x0F;
output(nibble);
toggle(clock);

it would be much more work if you had to set each line independently.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds