class Port
The Ports class is a thin wrapper around the Arduino's digitalRead(), digitalWrite(), analogRead(), etc. functions. It was designed to simplify the use of ports on JeeNodes.
#include <Ports.h>
#include <RF12.h> // needed to avoid a linker error :(
class Port;
Public API
DIO pin
- Port mode() - define DIO as input or output pin
- Port digiRead() - read value of the DIO pin
- Port digiWrite() - set value of the DIO pin
- Port anaWrite() - set up PWM on DIO pin (only specific ports)
- Port pulse() - measure pulse length on DIO pin
AIO pin
- Port mode2() - define AIO as input or output pin
- Port anaRead() - read analog value on AIO pin
- Port digiread2() - read digital level on the AIO pin
- Port digiWrite2() - set digital level on the AIO pin
- Port pulse2() - measure pulse length on the AIO pin
DIO + AIO pins
- Port shift() - send 8 bits out the DIO pin while pulsing the AIO pin
- Port shiftRead() - pulse AIO pin and read a number of bits from the DIO pin
- Port shiftWrite() - pulse AIO pin and write a number of bits to the DIO pin
IRQ pin
- Port mode3() - define IRQ as input or output pin (static member)
- Port digiRead3() - read digital level on the IRQ pin (static member)
- Port digiWrite3() - set digital level on the IRQ pin (static member)