Skip to content

Commit

Permalink
Renamed Phases -> Signals for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSaw committed Mar 21, 2021
1 parent 567cb1b commit c47bb14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modm/driver/encoder/bitbang_encoder_input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class BitBangEncoderInput
static_assert(POSTSCALER <= std::numeric_limits<DeltaType>::max(),
"DeltaType is to small for POSTSCALER.");

using Phases = modm::platform::SoftwareGpioPort<SignalA, SignalB>;
using Signals = modm::platform::SoftwareGpioPort<SignalA, SignalB>;

static_assert(Phases::number_of_ports == 1,
static_assert(Signals::number_of_ports == 1,
"Signal A/B must be on the same GPIO port to prevent signal tearing!");

uint8_t inline getRaw();
Expand Down
4 changes: 2 additions & 2 deletions src/modm/driver/encoder/bitbang_encoder_input_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ template<typename SignalA, typename SignalB, uint8_t POSTSCALER,
inline uint8_t
modm::BitBangEncoderInput<SignalA, SignalB, POSTSCALER, DeltaType>::getRaw()
{
const uint8_t read = Phases::read();
const uint8_t read = Signals::read();
// convert graycode to binary
uint8_t raw = 0;
if (read & 0b10) raw = 3;
Expand All @@ -22,7 +22,7 @@ template<typename SignalA, typename SignalB, uint8_t POSTSCALER,
inline void
modm::BitBangEncoderInput<SignalA, SignalB, POSTSCALER, DeltaType>::connect()
{
Phases::setInput(::Gpio::InputType::PullUp);
Signals::setInput(::Gpio::InputType::PullUp);

// Tare power-on state
modm::delay(10us);
Expand Down

0 comments on commit c47bb14

Please sign in to comment.