#include <outputportpin.h>
Output pin that can be set to a boolean value. The OutputPortPin works with any OutputPort interface. This could be a simple GpioPort, or a more sophisticated device like an OutputShiftRegisterPort.
- Note
- You have to make sure that pins being used for a OutputPortPin to operate on must be configured as output. The OutputPortPin doesn't know about setting a direction. So if you plan to use a GpioPort for this, first set it up correctly using its setDirection() method.
◆ OutputPortPin()
OutputPortPin::OutputPortPin |
( |
OutputPort * |
port, |
|
|
uint8_t |
index |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
port | Pointer to output port the pin is located on. |
index | Zero based index of the pin within the port (e.g. index 2 on PortB results in the pin commonly called PB2). |
◆ setValue()
virtual void OutputPortPin::setValue |
( |
bool |
value | ) |
|
|
inlineoverridevirtual |
Sets the pin to the specified value.
- Parameters
-
value | Value to set, true means HIGH level, false means LOW level. |
Implements OutputPin.