#include <virtualoutputport.h>
Virtual 8 bit port consisting of 8 pins of type OutputPin. This is a convenience wrapper for PinArray implementing the OutputPort interface.
◆ VirtualOutputPort()
Constructor. Assigns pins to internal PinArray. The parameters intentionally don't have default values so that you have to make up your mind. See notes.
- Parameters
-
pin0 | Pin to be used for bit position 0. |
pin1 | Pin to be used for bit position 1. |
pin2 | Pin to be used for bit position 2. |
pin3 | Pin to be used for bit position 3. |
pin4 | Pin to be used for bit position 4. |
pin5 | Pin to be used for bit position 5. |
pin6 | Pin to be used for bit position 6. |
pin7 | Pin to be used for bit position 7. |
- Note
- You can specify null pointers for pins that should not be used (meaning bits that will be ignored when writing).
-
You can specify the same pin multiple times.
◆ setValue()
virtual void VirtualOutputPort::setValue |
( |
uint8_t |
value, |
|
|
uint8_t |
mask = 0xff |
|
) |
| |
|
inlineoverridevirtual |
Set value being represented by set of pins.
- Parameters
-
value | Value to be set. |
mask | Mask with pins to manipulate according to value. |
Implements OutputPort.