Namespace Pamoja.Gpio
Classes
- Contact
Builds contacts, inferring the line's type.
- Contact<TLine>
A two-state input over any line, with its polarity said once: a button, a float switch, a reed switch, a limit switch. IsAsserted() answers whether it is closed, pressed, or tripped, whatever level that takes on the wire.
- GpioLine
A GPIO line opened on a Linux board, through the kernel's GPIO character device: the line a Switch<TLine> or a Contact<TLine> sits over on a Raspberry Pi or any Linux board.
- I2c
I2C addressing per the NXP I2C-bus specification (UM10204).
- Pin
The GPIO pin model: levels, interrupt edges, and active polarity.
- PinScript
A line for running with nothing plugged in: it answers the reads it was given, in order, and records every level it is driven to. It is what the examples and tests put under a switch or a contact, and the one thing a real node replaces with its board's pin library.
- Spi
The four SPI clock modes, as the (CPOL, CPHA) pair datasheets quote.
- SpiClock
The clock polarity and phase pair an SPI mode number names.
- Switch
Builds switches, inferring the line's type.
- Switch<TLine>
A two-state output over any line, with its polarity said once: a relay, an LED, a solenoid valve, a buzzer.
Set(true)asserts it, which drives the line low for an active-low part, so no call site inverts a level by hand.
Interfaces
- IInputLine
A line a pin library reads, which a Contact<TLine> sits over.
- IOutputLine
A line a pin library drives:
System.Device.Gpioon a Raspberry Pi, a vendor SDK on a microcontroller, or a PinScript in a test. Anything with this one method can sit under a Switch<TLine>.
Enums
- PinEdge
The signal transition that triggers a pin interrupt.
- PinLevel
The physical voltage level on a pin.
- PinPolarity
Whether a signal is asserted by a high or a low physical level.