IBM OCP GPIO driver for linux 2.6
miltonm at bga.com
Fri Aug 4 04:25:26 EST 2006
On Thu Aug 3 2006 08:53:00 AM CDT, Dale Farnsworth wrote:
> The recommended way of accessing GPIO registers is to mmap them
> and manipulate them directly in user space.
> /* turn media led on */
> *reg_addr(p, OUTPUT_REG) &= ~MEDIA_LED_BIT;
> /* turn media led off */
> *reg_addr(p, OUTPUT_REG) |= MEDIA_LED_BIT;
Very racy if you need different bits in the same word controlled by different programs.
More information about the Linuxppc-embedded