| GPIOIRQ(4) | Device Drivers Manual | GPIOIRQ(4) |
gpioirq —
gpioirq* at gpio? offset 0 mask 0x1 flag 0x00
gpioirq driver attaches an interrupt handler to a
single GPIO pin.
The pin number is specified in the kernel configuration file with the offset locator. The mask locator should always be 0x1.
The flag locator specifies the interrupt mode to use:
0x010x020x040x080x10Note that the interrupts modes are mutually-exclusive, and exactly
one interrupt mode must be specified. These flags correspond to the
GPIO_INTR mode bits defined in
sys/gpio.h. In addition to the interrupt mode,
setting 0x1000 in flags will
enable the printing of a message to the console whenever the interrupt
handler is called.
The offset, mask, and
flag locators can also be specified when
gpioirq is attached at runtime using the
GPIOATTACH
ioctl(2) on the
gpio(4) device.
gpioirq driver first appeared in
NetBSD 9.0.
gpioirq driver was written by Brad
Spencer
<brad@anduin.eldar.org>.
| May 11, 2018 | NetBSD 9.2 |