Skip to content

Commit

Permalink
Fix missing Polarity on PinConf
Browse files Browse the repository at this point in the history
  • Loading branch information
danngreen committed Dec 6, 2024
1 parent 37e5782 commit c8d2516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/drivers/pinconf.hh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ struct PinConf {
PinNum pin{PinNum::Unused};
PinAF af{PinAF::AFNone};

// FIXME: Polarity is not used

void init(PinMode mode,
PinPull pull = PinPull::None,
PinPolarity polarity = PinPolarity::Normal,
Expand Down
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ void main()

// Check Boot Select pin
if constexpr (Board::UseBootSelect) {
Board::BootSelectPin.init(PinMode::Input, PinPull::Up, PinPolarity::Inverted);
Board::BootSelectPin.init(PinMode::Input, PinPull::Up);
// delay to allow pull-up to settle
udelay(1000);
if (Board::BootSelectPin.read()) {
if (!Board::BootSelectPin.read()) {
image_type = BootLoader::LoadTarget::SSBL;
print("Boot Select pin detected active: Loading alt image...\n");
}
Expand Down

0 comments on commit c8d2516

Please sign in to comment.