avr-classes
Public Member Functions | List of all members
VirtualOutputPort Class Reference

#include <virtualoutputport.h>

Inheritance diagram for VirtualOutputPort:
OutputPort

Public Member Functions

 VirtualOutputPort (OutputPin *pin0, OutputPin *pin1, OutputPin *pin2, OutputPin *pin3, OutputPin *pin4, OutputPin *pin5, OutputPin *pin6, OutputPin *pin7)
 
virtual void setValue (uint8_t value, uint8_t mask=0xff) override
 

Detailed Description

Virtual 8 bit port consisting of 8 pins of type OutputPin. This is a convenience wrapper for PinArray implementing the OutputPort interface.

Constructor & Destructor Documentation

◆ VirtualOutputPort()

VirtualOutputPort::VirtualOutputPort ( OutputPin pin0,
OutputPin pin1,
OutputPin pin2,
OutputPin pin3,
OutputPin pin4,
OutputPin pin5,
OutputPin pin6,
OutputPin pin7 
)
inline

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
pin0Pin to be used for bit position 0.
pin1Pin to be used for bit position 1.
pin2Pin to be used for bit position 2.
pin3Pin to be used for bit position 3.
pin4Pin to be used for bit position 4.
pin5Pin to be used for bit position 5.
pin6Pin to be used for bit position 6.
pin7Pin 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.

Member Function Documentation

◆ setValue()

virtual void VirtualOutputPort::setValue ( uint8_t  value,
uint8_t  mask = 0xff 
)
inlineoverridevirtual

Set value being represented by set of pins.

Parameters
valueValue to be set.
maskMask with pins to manipulate according to value.

Implements OutputPort.