Skip to content

Commit

Permalink
Rename eduEnabledPin to eduEnablePin
Browse files Browse the repository at this point in the history
Also, the gpio variant of the name.

The original spelling was an error. It was always called EDU enable pin,
e.g., in KiCAD.
  • Loading branch information
PatrickKa committed Jul 11, 2023
1 parent ce92843 commit 3b06a53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sts1CobcSw/Hal/IoNames.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inline constexpr auto led2Pin = pb15;
inline constexpr auto epsBatteryGoodPin = pc15;
inline constexpr auto epsChargingPin = pc14;

inline constexpr auto eduEnabledPin = pb0;
inline constexpr auto eduEnablePin = pb0;
inline constexpr auto eduHeartbeatPin = pc5;
inline constexpr auto eduUpdatePin = pb1;

Expand Down
6 changes: 3 additions & 3 deletions Sts1CobcSw/Periphery/Edu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ auto Print(std::span<Byte> data, int nRows = 30) -> void; // NOLINT
//! @brief Must be called in an init() function of a thread.
auto Edu::Initialize() -> void
{
eduEnabledGpioPin_.Direction(hal::PinDirection::out);
eduEnableGpioPin_.Direction(hal::PinDirection::out);
// TODO: I think we should actually read from persistent state to determine whether the EDU
// should be powered or not. We do have a separate EDU power management thread which though.
TurnOff();
Expand All @@ -75,7 +75,7 @@ auto Edu::TurnOn() -> void
// EduPowerManagementThread.cpp
periphery::persistentstate::EduShouldBePowered(true);
// Edu enabled pin uses inverted logic
eduEnabledGpioPin_.Reset();
eduEnableGpioPin_.Reset();
}


Expand All @@ -85,7 +85,7 @@ auto Edu::TurnOff() -> void
// EduPowerManagementThread.cpp
periphery::persistentstate::EduShouldBePowered(false);
// Edu enabled pin uses inverted logic
eduEnabledGpioPin_.Set();
eduEnableGpioPin_.Set();
}


Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Periphery/Edu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Edu
[[nodiscard]] auto ReturnResultRetry() -> ResultInfo;
void MockWriteToFile(std::span<Byte> data);

hal::GpioPin eduEnabledGpioPin_ = hal::GpioPin(hal::eduEnabledPin);
hal::GpioPin eduEnableGpioPin_ = hal::GpioPin(hal::eduEnablePin);
RODOS::HAL_UART uart_ =
RODOS::HAL_UART(hal::eduUartIndex, hal::eduUartTxPin, hal::eduUartRxPin);
// RODOS::HAL_UART uart_ =
Expand Down

0 comments on commit 3b06a53

Please sign in to comment.