Re: IBM OCP GPIO driver for linux 2.6

From: Milton Miller <hidden>
Date: 2006-08-03 18:25:26

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;
		sleep(1);
		/* 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.

milton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help