gpiosim
—
General Purpose Input/Output Simulator
The gpiosim
pseudo-device simulates a 64-bit wide
gpio(4) device. The state of the
simulated device can be manipulated through the
sysctl(8) interface. For this
purpose, access the "hw.gpiosim<N>.value"
sysctl(8) variable, where
"<N>" denotes the number of the
gpiosim
instance.
Both edge and level interrupts are simulated. The
"hw.gpiosim<N>.ms"
sysctl(8) variable will change
the amount of time between
callout(9) ticks for
simulated level interrupts.