Relative Rotary Encoder.
More...
#include <InputHardware.hpp>
|
| static bool | setPulseMultiplier (uint8_t multiplier) |
| | Set a time multiplier for "pulse" events.
|
| |
Relative Rotary Encoder.
Definition at line 88 of file InputHardware.hpp.
◆ RotaryEncoderInput()
Construct a new Rotary Encoder Input object.
- Parameters
-
| [in] | clkPin | GPIO pin attached to the "CLK" (or "A") pin of the encoder. |
| [in] | dtPin | GPIO pin attached to the "DT" (or "B") pin of the encoder. |
| [in] | cwButtonNumber | An input number for the clockwise rotation event. |
| [in] | ccwButtonNumber | An input number for the counter-clockwise rotation event. |
| [in] | useAlternateEncoding | Set to true in order to use the signal encoding of ALPS RKJX series of rotary encoders, and the alike. |
- Note
- Internal pullup resistors will be enabled when available.
◆ read()
| virtual void RotaryEncoderInput::read |
( |
uint128_t & | state | ) |
|
|
overridevirtual |
Read the current state of the inputs (pressed or released)
- Warning
- This function must not set or clear any bit outside of the input bitmask in the return value.
- Parameters
-
| [in,out] | state | At call, state of all inputs as recorded in the previous iteration. Whether the current state is unknown, state must be kept untouched. At return, new state of the inputs. |
Implements DigitalInput.
◆ setPulseMultiplier()
| static bool RotaryEncoderInput::setPulseMultiplier |
( |
uint8_t | multiplier | ) |
|
|
inlinestatic |
Set a time multiplier for "pulse" events.
- Parameters
-
| multiplier | A time multiplier between 1 and 6. Invalid values are ignored. |
- Returns
- true if the multiplier has changed.
-
false otherwise.
Definition at line 149 of file InputHardware.hpp.
◆ pulseMultiplier
| uint8_t RotaryEncoderInput::pulseMultiplier = 1 |
|
inlinestatic |
Pulse multiplier for rotary encoders.
- Note
- For read only. Do not overwrite. Always greater than zero.
Definition at line 116 of file InputHardware.hpp.
The documentation for this class was generated from the following file: