Skip to content

Commit c8d2516

Browse files
committed
Fix missing Polarity on PinConf
1 parent 37e5782 commit c8d2516

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/drivers/pinconf.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ struct PinConf {
9696
PinNum pin{PinNum::Unused};
9797
PinAF af{PinAF::AFNone};
9898

99+
// FIXME: Polarity is not used
100+
99101
void init(PinMode mode,
100102
PinPull pull = PinPull::None,
101103
PinPolarity polarity = PinPolarity::Normal,

src/main.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ void main()
4747

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

0 commit comments

Comments
 (0)