+configures the interrupt delivery type and FIFO size for buffered gpio interrupts. By default, delivery is of type
+.Ft gpio_event_detail
+with a default FIFO size of 2 * number of pins belonging to the
+.Ft gpio_device_t
+instance. The FIFO argument is only meaningful when the delivery is of type
+.Ft gpio_event_detail .
+The complete list of delivery types and their associated structures is defined in
+.Pa /usr/include/sys/gpio.h .
+This setting is tracked on a per device instance basis. The FIFO size cannot be reduced below the default value, nor can it be decreased after it has been increased. If any pin on the device
+has already been configured,
+.Fn gpio_configure_events
+will fail and return EINVAL.
+.Pp
+The function
+.Fn gpio_fileno
+returns the file descriptor associated with the
+.Ft gpio_handle_t
+instance.
+.Pp
+File operations have the following semantics:
+.Bl -tag -width ioctl
+.It Xr read 2
+Read one or more gpio interrupts that have occured since the last successful
+.Xr read 2 .
+The results are placed into the output buffer of the type previously established via
+.Fn gpio_configure_events .
+If there are no pending interrupts,
+.Xr read 2
+blocks until an interrupt occurs, unless O_NONBLOCK is set.
+.It Xr poll 2
+When receiving notification via
+.Xr poll 2
+or similar interfaces, the file descriptor becomes readable when one or more gpio interrupts are pending.
.Sh EXAMPLES
The following example shows how to configure pin 16 as output and then