12 namespace duds {
namespace hardware {
namespace interface {
67 DigitalPinCap::OutputPushPull | DigitalPinCap::OutputDriveLow |
68 DigitalPinCap::OutputDriveHigh | DigitalPinCap::OutputHighImpedance
76 DigitalPinCap::HasPullup)
77 ) && (~
capabilities & (DigitalPinCap::ControllablePulldown |
78 DigitalPinCap::ControllablePullup)
117 DigitalPinCap::OutputPushPull | DigitalPinCap::Input
128 DigitalPinCap::OutputPushPull | DigitalPinCap::Input
static constexpr Flags OutputDriveMask
A mask of all output flags that involve driving the line.
static constexpr Flags Input
Input operation is supported.
static constexpr Flags EventEdgeRising
The pin supports setting an event flag on the rising edge.
constexpr Reason UnsupportedOutput
The requested output configuration is not supported by the hardware or driver.
constexpr bool test(const BitFlags &value, const BitFlags &mask) const
Returns true if the flags identified by mask have the same value as those flags do in value...
static constexpr Flags OutputDriveLow
The output is or can be an open collector or open drain type.
static constexpr Flags DirInput
Configure the pin for input.
Defines the configuration for a digital general purpose I/O pin.
static constexpr Flags OutputDriveHigh
The output is or can be an open emitter type.
static constexpr Flags EventEdgeChange
The pin supports setting an event flag on an edge change.
static constexpr BitFlags Zero()
Makes a bit flags container with all flags cleared.
static constexpr Flags EventLevelHigh
Configure the pin to flag an event on a high level input.
static constexpr Flags OutputHighImpedance
Configure the pin to have a high impedance or floating output.
static constexpr Flags InputPulldown
Configure the pin to have a pull-down resistor.
constexpr Reason UnsupportedInputPull
The requested pull up or pull down configuration is not supported by the hardware or driver...
static constexpr Flags OutputPushPull
Configure the pin to drive output both high and low.
static constexpr Flags EventLevelHigh
The pin supports setting an event flag on a high level.
static constexpr Flags EventEdgeFalling
Configure the pin to flag an event on the falling edge.
std::uint16_t maxOutputCurrent
The maximum output current in milliamps (?) the pin can manage, or zero if unspecified or not applica...
static constexpr Flags ControllablePullup
The use of the pin's pull-up resistor can be controlled by software.
Flags capabilities
The capabilities of a digital pin.
DigitalPinConfig::Flags firstOutputDriveConfigFlags() const
Returns the output configuration flags that corresponds to the result of firstOutputDriveFlag().
static constexpr Flags EventLevelLow
The pin supports setting an event flag on a low level.
static constexpr Flags OutputDriveLow
Configure the pin to be able to drive the output low.
duds::general::BitFlags< struct DigitalPinFlags, std::uint16_t > Flags
A container of flags that control the operation of a digital pin.
static constexpr Flags InputPullup
Configure the pin to have a pull-up resistor.
constexpr Reason NotRejected
There is no error with the requested pin configuration for the referenced pin.
static constexpr Flags OutputDriveHigh
Configure the pin to be able to drive the output high.
constexpr Reason UnsupportedDirection
The I/O direction configuration is not supported by the hardware or driver.
static constexpr Flags OutputNoChange
Do not change the pin's output configuration.
std::uint16_t minOutputCurrent
The selected minimum output current in milliamps (?) for the pin, or zero for no change and immateria...
constexpr Reason UnsupportedEvent
The event pin configuration is not supported by the hardware or driver.
static constexpr Flags OutputPushPull
The output can drive the line either low or high.
static constexpr Flags EventLevelLow
Configure the pin to flag an event on a low level input.
static constexpr Flags InputNoPull
Configure the pin to not use a pull-up or pull-down resistor.
std::uint16_t bitsType
The datatype used to store the flags.
static constexpr Flags OutputHighImpedance
The pin supports a high impedance state without input.
static constexpr Flags DirOutput
Configure the pin for output.
constexpr BitsType flags() const
Returns the value stored in the object.
static constexpr Flags InterruptOnEvent
Configure the pin to trigger an interrupt when an event occurs.
static constexpr Flags InterruptOnEvent
The pin supports triggering an interrupt when an event occurs.
void checkValidity() const
Checks for the use of obviously invalid data, such as the use of mutually exclusive options...
Flags options
The control options requested for a digital pin.
Flags firstOutputDriveFlag() const
Checks the flags in OutputDriveMask, starting with OutputPushPull, and returns the first match found ...
constexpr Reason UnsupportedInterrupt
The requested interrupt configuration is not supported by the hardware or driver. ...
static constexpr Flags HasPulldown
The pin has a pull-down resistor.
DigitalPinRejectedConfiguration::Reason compatible(const DigitalPinConfig &cfg) const
Returns a set of flags that indicate certain incompatible conditions in the given pin configuration i...
static constexpr Flags ControllablePulldown
The use of the pin's pull-down resistor can be controlled by software.
static constexpr Flags EventEdgeFalling
The pin supports setting an event flag on the falling edge.
static constexpr Flags EventEdgeRising
Configure the pin to flag an event on the rising edge.
static constexpr Flags HasPullup
The pin has a pull-up resistor.